PL_scopestack_name needs to be present, -DDEBUGGING or not.
[p5sagit/p5-mst-13.2.git] / ext / POSIX / t / is.t
index 6aa96f0..cb36fb5 100644 (file)
@@ -1,8 +1,6 @@
 #!./perl -w
 
 BEGIN {
-    chdir 't' if -d 't';
-    @INC = '../lib';
     require Config; import Config;
     if ($^O ne 'VMS' and $Config{'extensions'} !~ /\bPOSIX\b/) {
        print "1..0\n";
@@ -10,12 +8,14 @@ BEGIN {
     }
 }
 
-
 use POSIX;
 use strict ;
 
-$| = 1;
+# E.g. \t might or might not be isprint() depending on the locale,
+# so let's reset to the default.
+setlocale(LC_ALL, 'C') if $Config{d_setlocale};
 
+$| = 1;
 
 # List of characters (and strings) to feed to the is<xxx> functions.
 #
@@ -50,6 +50,10 @@ my %classes =
    " \t"       => [ qw(space) ],
 
    "abcde\001" => [],
+
+   # An empty string. Always true (al least in old days) [bug #24554]
+   ''     => [ qw(print graph alnum alpha lower upper digit xdigit
+                  punct cntrl space) ],
   );
 
 
@@ -66,7 +70,7 @@ foreach my $s (keys %classes) {
 
 # Expected number of tests is one each for every combination of a
 # known is<xxx> function and string listed above.
-require './test.pl';
+require '../../t/test.pl';
 plan(tests => keys(%classes) * keys(%functions));