X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fver.t;h=79c36b6bc585312b251cefa9f306440dc6198515;hb=3444c34c7da9f235e181b5c175a1fa1357e7a055;hp=5cf97a8b9be9ddcb6e9dd25ec0e56ea1c31860cf;hpb=439cb1c4bca8637a65af6ff559799d9f5b05b394;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/ver.t b/t/op/ver.t index 5cf97a8..79c36b6 100755 --- a/t/op/ver.t +++ b/t/op/ver.t @@ -11,9 +11,9 @@ $DOWARN = 1; # enable run-time warnings now use Config; require "test.pl"; -plan( tests => 50 ); +plan( tests => 53 ); -eval { use v5.5.640; }; +eval 'use v5.5.640'; is( $@, '', "use v5.5.640; $@"); require_ok('v5.5.640'); @@ -52,7 +52,7 @@ is(v1.20.300.4000, "\x{1}\x{14}\x{12c}\x{fa0}",'compare embedded \x{} string'); # # now do the same without the "v" -eval { use 5.5.640; }; +eval 'use 5.5.640'; is( $@, '', "use 5.5.640; $@"); require_ok('5.5.640'); @@ -254,3 +254,13 @@ is( ref(\$v), 'VSTRING', 'v-string objects' ); $v = v1.2_3; is( ref(\$v), 'VSTRING', 'v-string objects with v' ); is( sprintf("%vd", $v), '1.23', 'v-string ignores underscores' ); + +# [perl #16010] +%h = (v65 => 42); +ok( exists $h{v65}, "v-stringness is not engaged for vX" ); +%h = (v65.66 => 42); +ok( exists $h{chr(65).chr(66)}, "v-stringness is engaged for vX.Y" ); +%h = (65.66.67 => 42); +ok( exists $h{chr(65).chr(66).chr(67)}, "v-stringness is engaged for X.Y.Z" ); + +