Re: Why *not* use UNIVERSAL qw( isa can ) ; ??
[p5sagit/p5-mst-13.2.git] / t / op / split.t
index 170dfe8..f9c3bb9 100755 (executable)
@@ -5,7 +5,7 @@ BEGIN {
     @INC = '../lib';
 }
 
-print "1..45\n";
+print "1..46\n";
 
 $FS = ':';
 
@@ -254,3 +254,14 @@ print "ok 32\n";
     print "not " unless $r eq "he:o cruel world";
     print "ok 45\n";
 }
+
+
+{
+    # split /(A)|B/, "1B2" should return (1, undef, 2)
+    my @x = split /(A)|B/, "1B2";
+    print "not " unless
+      $x[0] eq '1' and
+      (not defined $x[1]) and
+      $x[2] eq '2';
+    print "ok 46\n";
+}