summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rwxr-xr-xt/comp/require.t6
-rwxr-xr-xt/op/ver.t24
2 files changed, 24 insertions, 6 deletions
diff --git a/t/comp/require.t b/t/comp/require.t
index cd97c55eda..efce899edc 100755
--- a/t/comp/require.t
+++ b/t/comp/require.t
@@ -47,7 +47,7 @@ eval { require v5.5.630; };
print "# $@\nnot " if $@;
print "ok ",$i++,"\n";
-eval { require v10.0.2; };
+eval { require 10.0.2; };
print "# $@\nnot " unless $@ =~ /^Perl v10\.0\.2 required/;
print "ok ",$i++,"\n";
@@ -55,7 +55,7 @@ eval q{ use v5.5.630; };
print "# $@\nnot " if $@;
print "ok ",$i++,"\n";
-eval q{ use v10.0.2; };
+eval q{ use 10.0.2; };
print "# $@\nnot " unless $@ =~ /^Perl v10\.0\.2 required/;
print "ok ",$i++,"\n";
@@ -75,7 +75,7 @@ eval { require $ver; };
print "# $@\nnot " unless $@ =~ /^Perl v10\.0\.20 required/;
print "ok ",$i++,"\n";
-print "not " unless v5.5.1 gt v5.5;
+print "not " unless 5.5.1 gt v5.5;
print "ok ",$i++,"\n";
{
diff --git a/t/op/ver.t b/t/op/ver.t
index 206b1d08f8..b08849f53a 100755
--- a/t/op/ver.t
+++ b/t/op/ver.t
@@ -5,7 +5,7 @@ BEGIN {
unshift @INC, "../lib";
}
-print "1..18\n";
+print "1..22\n";
my $test = 1;
@@ -35,6 +35,24 @@ print "ok $test\n"; ++$test;
print "not " unless v1.20.300.4000 eq "\x{1}\x{14}\x{12c}\x{fa0}";
print "ok $test\n"; ++$test;
+#
+# now do the same without the "v"
+use 5.5.640;
+require 5.5.640;
+print "ok $test\n"; ++$test;
+
+# hash keys too
+$h{111.107.32} = "ok";
+print "$h{ok } $test\n"; ++$test;
+
+$x = 77.78.79;
+print "not " unless $x eq "MNO";
+print "ok $test\n"; ++$test;
+
+print "not " unless 1.20.300.4000 eq "\x{1}\x{14}\x{12c}\x{fa0}";
+print "ok $test\n"; ++$test;
+
+# test sprintf("%vd"...) etc
print "not " unless sprintf("%vd", "Perl") eq '80.101.114.108';
print "ok $test\n"; ++$test;
@@ -44,7 +62,7 @@ print "ok $test\n"; ++$test;
print "not " unless sprintf("%vx", "Perl") eq '50.65.72.6c';
print "ok $test\n"; ++$test;
-print "not " unless sprintf("%vX", v1.22.333.4444) eq '1.16.14D.115C';
+print "not " unless sprintf("%vX", 1.22.333.4444) eq '1.16.14D.115C';
print "ok $test\n"; ++$test;
print "not " unless sprintf("%*v#o", ":", "Perl") eq '0120:0145:0162:0154';
@@ -60,7 +78,7 @@ print "ok $test\n"; ++$test;
print "ok $test\n"; ++$test;
print "not " unless
- sprintf("%vd", v1.22.333.4444) eq '1.22.197.141.225.133.156';
+ sprintf("%vd", 1.22.333.4444) eq '1.22.197.141.225.133.156';
print "ok $test\n"; ++$test;
print "not " unless sprintf("%vx", "Perl") eq '50.65.72.6c';