perl 3.0 patch #32 patch #29, continued
[p5sagit/p5-mst-13.2.git] / t / op.substr
index c91c377..bbe2c04 100644 (file)
@@ -1,8 +1,8 @@
 #!./perl
 
-# $Header: op.substr,v 3.0 89/10/18 15:31:52 lwall Locked $
+# $Header: op.substr,v 3.0.1.1 90/10/16 10:56:35 lwall Locked $
 
-print "1..19\n";
+print "1..22\n";
 
 $a = 'abcdefxyz';
 
@@ -40,3 +40,8 @@ print $a eq '12345678abcXYZ<' ? "ok 18\n" : "not ok 18\n";
 substr($a,-1,1) = '12345678';
 print $a eq '12345678abcXYZ12345678' ? "ok 19\n" : "not ok 19\n";
 
+$a = 'abcdefxyz';
+
+print (substr($a,6) eq 'xyz' ? "ok 20\n" : "not ok 20\n");
+print (substr($a,-3) eq 'xyz' ? "ok 21\n" : "not ok 21\n");
+print (substr($a,999) eq '' ? "ok 22\n" : "not ok 22\n");