t/op/my_stash.t should use test.pl instead of Test.pm
[p5sagit/p5-mst-13.2.git] / t / op / split.t
old mode 100755 (executable)
new mode 100644 (file)
index b6d7570..b3a9741
@@ -6,7 +6,7 @@ BEGIN {
     require './test.pl';
 }
 
-plan tests => 130;
+plan tests => 136;
 
 $FS = ':';
 
@@ -347,3 +347,20 @@ ok(@ary == 3 &&
         ok(@r3 == 3 && join('-', @r3) eq "-:A:-:B", "$msg - /\\s+/ No.2");
     }
 }
+
+{
+    my $src = "ABC \0 FOO \0  XYZ";
+    my @s = split(" \0 ", $src);
+    my @r = split(/ \0 /, $src);
+    is(scalar(@s), 3);
+    is($s[0], "ABC");
+    is($s[1], "FOO");
+    is($s[2]," XYZ");
+    is(join(':',@s), join(':',@r));
+}
+
+{
+    use constant BANG => {};
+    () = split m/,/, "", BANG;
+    ok(1);
+}