This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
t/uni/variables.t: Test what it purports to test
authorKarl Williamson <khw@cpan.org>
Thu, 22 Dec 2016 04:31:06 +0000 (21:31 -0700)
committerKarl Williamson <khw@cpan.org>
Fri, 23 Dec 2016 00:59:10 +0000 (17:59 -0700)
One of the tests wasn't testing what it thought it was, since evalbytes
downgrades the input if if is UTF-8 encoded.  Therefore, this needs to
use unicode_eval, as the other places in the .t that do similar things
use.

t/uni/variables.t

index edeebf4..a1f7cc2 100644 (file)
@@ -130,7 +130,7 @@ for ( 0x0 .. 0xff ) {
                      "$name as a length-1 variable generates a syntax error");
             $tests++;
             utf8::upgrade($chr);
-            evalbytes "no strict; use utf8; \$$chr = 4;",
+            eval "no strict; \$$chr = 4;",
             like($@, qr/ syntax\ error | Unrecognized\ character /x,
                      "  ... and the same under 'use utf8'");
             $tests++;