diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-08 21:58:17 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-10-09 09:00:39 +0200 |
commit | f2a3bb21a1100f37023e2a89faccca76359cd969 (patch) | |
tree | 8fdfbeaf623545b9194c4e78316191a3b2ea3403 /t/comp | |
parent | bc4c40f2eb948644a92225726b3cab20f98488f7 (diff) | |
download | perl-f2a3bb21a1100f37023e2a89faccca76359cd969.tar.gz |
Move tests for use for "new style version numbers" to use.t from require.t
Diffstat (limited to 't/comp')
-rw-r--r-- | t/comp/require.t | 10 | ||||
-rwxr-xr-x | t/comp/use.t | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/t/comp/require.t b/t/comp/require.t index 0a2293bea6..06a3421a8d 100644 --- a/t/comp/require.t +++ b/t/comp/require.t @@ -22,7 +22,7 @@ krunch.pm krunch.pmc whap.pm whap.pmc); my $Is_EBCDIC = (ord('A') == 193) ? 1 : 0; my $Is_UTF8 = (${^OPEN} || "") =~ /:utf8/; -my $total_tests = 49; +my $total_tests = 47; if ($Is_EBCDIC || $Is_UTF8) { $total_tests -= 3; } print "1..$total_tests\n"; @@ -62,14 +62,6 @@ eval { require 10.0.2; }; print "# $@\nnot " unless $@ =~ /^Perl v10\.0\.2 required/; print "ok ",$i++,"\n"; -eval q{ use v5.5.630; }; -print "# $@\nnot " if $@; -print "ok ",$i++,"\n"; - -eval q{ use 10.0.2; }; -print "# $@\nnot " unless $@ =~ /^Perl v10\.0\.2 required/; -print "ok ",$i++,"\n"; - my $ver = 5.005_63; eval { require $ver; }; print "# $@\nnot " if $@; diff --git a/t/comp/use.t b/t/comp/use.t index a7ecda8d4a..ba7d58705c 100755 --- a/t/comp/use.t +++ b/t/comp/use.t @@ -6,7 +6,7 @@ BEGIN { $INC{"feature.pm"} = 1; # so we don't attempt to load feature.pm } -print "1..68\n"; +print "1..70\n"; # Can't require test.pl, as we're testing the use/require mechanism here. @@ -62,6 +62,14 @@ sub isnt ($$;$) { _ok ('isnt', @_); } +# new style version numbers + +eval q{ use v5.5.630; }; +is ($@, ''); + +eval q{ use 10.0.2; }; +like ($@, qr/^Perl v10\.0\.2 required/); + eval "use 5.000"; # implicit semicolon is ($@, ''); |