Integrate version.pm-0.77 into bleadperl
[p5sagit/p5-mst-13.2.git] / lib / charnames.t
index efb6608..b3e4a46 100644 (file)
@@ -15,7 +15,7 @@ require File::Spec;
 
 $| = 1;
 
-print "1..76\n";
+print "1..79\n";
 
 use charnames ':full';
 
@@ -271,11 +271,8 @@ print "ok 46\n";
 
 # ---- Alias extensions
 
-my $tmpfile = "tmp0000";
 my $alifile = File::Spec->catfile(File::Spec->updir, qw(lib unicore xyzzy_alias.pl));
 my $i = 0;
-1 while -e ++$tmpfile;
-END { if ($tmpfile) { 1 while unlink $tmpfile; } }
 
 my @prgs;
 {   local $/ = undef;
@@ -286,6 +283,7 @@ my $i = 46;
 for (@prgs) {
     my ($code, $exp) = ((split m/\nEXPECT\n/), '$');
     my ($prog, $fil) = ((split m/\nFILE\n/, $code), "");
+    my $tmpfile = tempfile();
     open my $tmp, "> $tmpfile" or die "Could not open $tmpfile: $!";
     print $tmp $prog, "\n";
     close $tmp or die "Could not close $tmpfile: $!";
@@ -323,7 +321,6 @@ for (@prgs) {
         print "not ";
        }
     print "ok ", ++$i, "\n";
-    1 while unlink $tmpfile;
     $fil or next;
     1 while unlink $alifile;
     }
@@ -349,6 +346,19 @@ if (ord('A') == 65) { # as on ASCII or UTF-8 machines
   print "ok 76\n";
 }
 
+# Verify that charnames propagate to eval("")
+my $evaltry = eval q[ "Eval: \N{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}" ];
+if ($@) {
+    print "# $@not ok 77\nnot ok 78\n";
+} else {
+    print "ok 77\n";
+    print "not " unless $evaltry eq "Eval: \N{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}";
+    print "ok 78\n";
+}
+
+# Verify that db includes the normative NameAliases.txt names
+print "not " unless "\N{U+1D0C5}" eq "\N{BYZANTINE MUSICAL SYMBOL FTHORA SKLIRON CHROMA VASIS}";
+print "ok 79\n";
 
 __END__
 # unsupported pragma