This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
longstanding bug in parsing "require VERSION", could reallocate
[perl5.git] / t / comp / require.t
index d4c9d8c..f963a8c 100755 (executable)
@@ -7,7 +7,7 @@ BEGIN {
 
 # don't make this lexical
 $i = 1;
-print "1..16\n";
+print "1..20\n";
 
 sub do_require {
     %INC = ();
@@ -23,6 +23,24 @@ sub write_file {
     close REQ;
 }
 
+eval {require 5.005};
+print "# $@\nnot " if $@;
+print "ok ",$i++,"\n";
+
+eval { require 5.005 };
+print "# $@\nnot " if $@;
+print "ok ",$i++,"\n";
+
+eval { require 5.005; };
+print "# $@\nnot " if $@;
+print "ok ",$i++,"\n";
+
+eval {
+    require 5.005
+};
+print "# $@\nnot " if $@;
+print "ok ",$i++,"\n";
+
 # new style version numbers
 
 eval { require v5.5.630; };