detypo
[p5sagit/p5-mst-13.2.git] / t / pragma / utf8.t
index e5b3bb5..2ae8d9c 100755 (executable)
@@ -4,9 +4,13 @@ BEGIN {
     chdir 't' if -d 't';
     unshift @INC, '../lib';
     $ENV{PERL5LIB} = '../lib';
+    if ( ord("\t") != 9 ) { # skip on ebcdic platforms
+        print "1..0 # Skip utf8 tests on ebcdic platform.\n";
+        exit;
+    }
 }
 
-print "1..3\n";
+print "1..12\n";
 
 my $test = 1;
 
@@ -34,4 +38,49 @@ sub ok {
     s/([$rx])/"&#".ord($1).";"/eg; 
     ok $_, '>&#9786;<';
     $test++;
+
+    $_ = "alpha,numeric"; 
+    m/([[:alpha:]]+)/; 
+    ok $1, 'alpha';
+    $test++;
+
+    $_ = "alphaNUMERICstring";
+    m/([[:^lower:]]+)/; 
+    ok $1, 'NUMERIC';
+    $test++;
+
+    $_ = "alphaNUMERICstring";
+    m/(\p{Ll}+)/; 
+    ok $1, 'alpha';
+    $test++;
+
+    $_ = "alphaNUMERICstring"; 
+    m/(\p{Lu}+)/; 
+    ok $1, 'NUMERIC';
+    $test++;
+
+    $_ = "alpha,numeric"; 
+    m/([\p{IsAlpha}]+)/; 
+    ok $1, 'alpha';
+    $test++;
+
+    $_ = "alphaNUMERICstring";
+    m/([^\p{IsLower}]+)/; 
+    ok $1, 'NUMERIC';
+    $test++;
+
+    $_ = "alpha123numeric456"; 
+    m/([\p{IsDigit}]+)/; 
+    ok $1, '123';
+    $test++;
+
+    $_ = "alpha123numeric456"; 
+    m/([^\p{IsDigit}]+)/; 
+    ok $1, 'alpha';
+    $test++;
+
+    $_ = ",123alpha,456numeric"; 
+    m/([\p{IsAlnum}]+)/; 
+    ok $1, '123alpha';
+    $test++;
 }