diff options
author | Nicholas Clark <nick@ccl4.org> | 2004-01-23 13:57:46 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-01-23 13:57:46 +0000 |
commit | 132d8bbf73395c4dba67e9728802e28e74a22baa (patch) | |
tree | 238f6cf20cedac253bd41a73fef47e6fcb0e9152 /t | |
parent | a6aa349da2cd706a05b205fa788c278b74c24bdc (diff) | |
download | perl-132d8bbf73395c4dba67e9728802e28e74a22baa.tar.gz |
Test return values of all chomps
p4raw-id: //depot/perl@22197
Diffstat (limited to 't')
-rwxr-xr-x | t/op/chop.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/t/op/chop.t b/t/op/chop.t index 29f5dddf6b..bacc439676 100755 --- a/t/op/chop.t +++ b/t/op/chop.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -plan tests => 93; +plan tests => 133; $_ = 'abc'; $c = do foo(); @@ -189,7 +189,7 @@ foreach my $start (@chars) { local $/ = $end; my $message = "start=" . ord ($start) . " end=" . ord $end; my $string = $start . $end; - chomp $string; + is (chomp ($string), 1, "$message [returns 1]"); is ($string, $start, $message); my $end_utf8 = $end; @@ -199,13 +199,13 @@ foreach my $start (@chars) { # $end ne $end_utf8, so these should not chomp. $string = $start . $end_utf8; my $chomped = $string; - chomp $chomped; + is (chomp ($chomped), 0, "$message (end as bytes) [returns 0]"); is ($chomped, $string, "$message (end as bytes)"); $/ = $end_utf8; $string = $start . $end; $chomped = $string; - chomp $chomped; + is (chomp ($chomped), 0, "$message (\$/ as bytes) [returns 0]"); is ($chomped, $string, "$message (\$/ as bytes)"); } } |