This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Skip regexp_unicode_prop.t under minitest, as File::Spec may not be available.
authorNicholas Clark <nick@ccl4.org>
Sat, 5 Mar 2011 22:49:29 +0000 (22:49 +0000)
committerNicholas Clark <nick@ccl4.org>
Sun, 6 Mar 2011 09:13:50 +0000 (09:13 +0000)
It uses charnames, which uses File::Spec->file_name_is_absolute().
As regexp_unicode_prop.t now requires test.pl, switch to using $::IS_EBCDIC,
which test.pl sets.

t/re/regexp_unicode_prop.t

index 017d3de..ee65dbd 100644 (file)
@@ -8,7 +8,10 @@ use strict;
 use warnings;
 use 5.010;
 
-my $IS_EBCDIC = ord ('A') == 193;
+BEGIN {
+    require './test.pl';
+    skip_all_if_miniperl("no dynamic loading on miniperl, no File::Spec (used by charnames)");
+}
 
 sub run_tests;
 
@@ -61,8 +64,8 @@ my @CLASSES = (
     # It's ok to repeat class names.
     #
     InLatin1Supplement        =>
-               $IS_EBCDIC ? ['!\x{7f}',  '\x{80}',            '!\x{100}']
-                          : ['!\x{7f}',  '\x{80}',  '\x{ff}', '!\x{100}'],
+               $::IS_EBCDIC ? ['!\x{7f}',  '\x{80}',            '!\x{100}']
+                            : ['!\x{7f}',  '\x{80}',  '\x{ff}', '!\x{100}'],
     InLatinExtendedA          =>
                             ['!\x{7f}', '!\x{80}', '!\x{ff}',  '\x{100}'],
 
@@ -153,7 +156,7 @@ while (my ($class, $chars) = each %SHORT_PROPERTIES) {
                                                      ? $_ : "!$_"} @$chars;
 }
 
-delete $d {IsASCII} if $IS_EBCDIC;
+delete $d {IsASCII} if $::IS_EBCDIC;
 
 push @CLASSES => "# Short properties"        => %SHORT_PROPERTIES,
                  "# POSIX like properties"   => %d,