Re: Are we missing some tests?
authorRobin Houston <robin@cpan.org>
Fri, 23 Nov 2007 16:15:46 +0000 (16:15 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 23 Nov 2007 18:04:30 +0000 (18:04 +0000)
Message-Id: <7C63C4C8-B0DA-46F2-81D7-F2C14AFF76B8@cpan.org>
Date: Fri, 23 Nov 2007 16:15:46 +0000

p4raw-id: //depot/perl@32468

t/op/ver.t

index d6b93e007537393e892589f203949e894a551ef9..fd1e4d26f9c4814159a2c84d0dafa28e936c56c0 100755 (executable)
@@ -11,7 +11,7 @@ $DOWARN = 1; # enable run-time warnings now
 use Config;
 
 require "test.pl";
-plan( tests => 53 );
+plan( tests => 54 );
 
 eval 'use v5.5.640';
 is( $@, '', "use v5.5.640; $@");
@@ -263,3 +263,13 @@ ok( exists $h{chr(65).chr(66)}, "v-stringness is engaged for vX.Y" );
 ok( exists $h{chr(65).chr(66).chr(67)}, "v-stringness is engaged for X.Y.Z" );
 
 
+# The following tests whether v-strings are correctly
+# interpreted by the tokeniser when it's in a XTERMORDORDOR
+# state (fittingly, the only tokeniser state to contain the
+# word MORDOR).
+
+*{"\3"} = *DATA;
+is( (readline v3), "This is what we expect to see!\n", "v-strings even work in Mordor" );
+
+__DATA__
+This is what we expect to see!