diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 1998-05-15 16:03:35 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 1998-05-15 16:03:35 +0000 |
commit | 157a3d9a879b77013095b55ff0a0418b88f31771 (patch) | |
tree | 9804b14da33dc2fed24bf930de9ce66c79cc2484 /t/op/substr.t | |
parent | 34e9701933920a1b91b5f5717935652f86850872 (diff) | |
parent | ebc58f1ae3702319e4a289ddf12b65aa41e620b0 (diff) | |
download | perl-157a3d9a879b77013095b55ff0a0418b88f31771.tar.gz |
Integrate win32
p4raw-id: //depot/ansiperl@987
Diffstat (limited to 't/op/substr.t')
-rwxr-xr-x | t/op/substr.t | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/t/op/substr.t b/t/op/substr.t index bb655f5209..967016a8d0 100755 --- a/t/op/substr.t +++ b/t/op/substr.t @@ -1,8 +1,6 @@ #!./perl -# $RCSfile: substr.t,v $$Revision: 4.1 $$Date: 92/08/07 18:28:31 $ - -print "1..97\n"; +print "1..100\n"; #P = start of string Q = start of substr R = end of substr S = end of string @@ -178,3 +176,13 @@ for (0,1) { # check no spurious warnings print $w ? "not ok 97\n" : "ok 97\n"; + +# check new replacement syntax +$a = "abcxyz"; +print "not " unless substr($a, 0, 3, "") eq "abc" && $a eq "xyz"; +print "ok 98\n"; +print "not " unless substr($a, 0, 0, "abc") eq "" && $a eq "abcxyz"; +print "ok 99\n"; +print "not " unless substr($a, 3, undef, "") eq "xyz" && $a eq "abc"; +print "ok 100\n"; + |