X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fbase%2Flex.t;h=984cdff39bfed4570d6f522eb1d0fcfdc1358929;hb=726514722fdec00cc69b3e5c86392c5c95a01f07;hp=4df49547332d65242bd03177e5d4f9cc40bf61ab;hpb=ce29ac451034df067115e81c1d12f5f8c0114302;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/base/lex.t b/t/base/lex.t index 4df4954..984cdff 100755 --- a/t/base/lex.t +++ b/t/base/lex.t @@ -1,6 +1,6 @@ #!./perl -print "1..54\n"; +print "1..55\n"; $x = 'x'; @@ -53,8 +53,8 @@ $foo EOF EOE -print <<`EOS` . <<\EOF; -echo ok 12 +print <<'EOS' . <<\EOF; +ok 12 - make sure single quotes are honored \nnot ok EOS ok 13 EOF @@ -130,10 +130,10 @@ print $foo; if (eval "\$ {\cX}" != 17 or $@) { print "not " } print "ok 32\n"; - eval "\$\cN = 24"; # Literal control character - if ($@ or ${"\cN"} != 24) { print "not " } + eval "\$\cQ = 24"; # Literal control character + if ($@ or ${"\cQ"} != 24) { print "not " } print "ok 33\n"; - if ($^N != 24) { print "not " } # Control character escape sequence + if ($^Q != 24) { print "not " } # Control character escape sequence print "ok 34\n"; # Does the old UNBRACED syntax still do what it used to? @@ -141,11 +141,11 @@ print $foo; print "ok 35\n"; sub XX () { 6 } - $ {"\cN\cXX"} = 119; - $^N = 5; # This should be an unused ^Var. + $ {"\cQ\cXX"} = 119; + $^Q = 5; # This should be an unused ^Var. $N = 5; # The second caret here should be interpreted as an xor - if (($^N^XX) != 3) { print "not " } + if (($^Q^XX) != 3) { print "not " } print "ok 36\n"; # if (($N ^ XX()) != 3) { print "not " } # print "ok 32\n"; @@ -166,13 +166,13 @@ print $foo; # Now let's make sure that caret variables are all forced into the main package. package Someother; - $^N = 'Someother'; - $ {^Nostril} = 'Someother 2'; + $^Q = 'Someother'; + $ {^Quixote} = 'Someother 2'; $ {^M} = 'Someother 3'; package main; - print "not " unless $^N eq 'Someother'; + print "not " unless $^Q eq 'Someother'; print "ok 39\n"; - print "not " unless $ {^Nostril} eq 'Someother 2'; + print "not " unless $ {^Quixote} eq 'Someother 2'; print "ok 40\n"; print "not " unless $ {^M} eq 'Someother 3'; print "ok 41\n"; @@ -260,3 +260,6 @@ my $test = 52; print ((exists $str{foo} ? "" : "not ")."ok $test\n"); ++$test; print ((exists $str{bar} ? "" : "not ")."ok $test\n"); ++$test; print ((exists $str{xyz::bar} ? "" : "not ")."ok $test\n"); ++$test; + +sub foo::::::bar { print "ok $test\n"; $test++ } +foo::::::bar;