summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-01-28 02:06:12 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-28 02:06:12 +0000
commit9ee2bb1a7c54b1866ff07ab9c157254810ee5205 (patch)
treec7fd211cebe3d47da94dc472d56f053f8b4a64e1 /t
parent41123dfdac2a292c8e128568f2262a373b14c931 (diff)
downloadperl-9ee2bb1a7c54b1866ff07ab9c157254810ee5205.tar.gz
Retract #8552.
p4raw-id: //depot/perl@8573
Diffstat (limited to 't')
-rwxr-xr-xt/lib/textwrap.t65
1 files changed, 24 insertions, 41 deletions
diff --git a/t/lib/textwrap.t b/t/lib/textwrap.t
index 2c4608cb81..af24036f85 100755
--- a/t/lib/textwrap.t
+++ b/t/lib/textwrap.t
@@ -84,21 +84,12 @@ END
a123456789b123456789c123456789d123456789e123456789f123456789g123456789g123
4567
END
-TEST10
-my mother once said
-"never eat paste my darling"
-would that I heeded
-END
- my mother once said
- "never eat paste my darling"
- would that I heeded
-END
DONE
$| = 1;
-print "1..". @tests . "\n";
+print "1..", @tests/2, "\n";
use Text::Wrap;
@@ -111,36 +102,28 @@ while (@tests) {
$in =~ s/^TEST(\d+)?\n//;
- # Make sure split() doesn't drop trailing empty sets.
- my @in = split("\n", $in, -1);
- @in = ((map { "$_\n" } @in[0..$#in-1]), $in[-1]);
-
- # We run wrap() both with a string and a list to test its
- # line joining logic.
- foreach my $back (wrap(' ', ' ', @in),
- wrap(' ', ' ', $in) ) {
+ my $back = wrap(' ', ' ', $in);
- if ($back eq $out) {
- print "ok $tn\n";
- } elsif ($rerun) {
- my $oi = $in;
- foreach ($in, $back, $out) {
- s/\t/^I\t/gs;
- s/\n/\$\n/gs;
- }
- print "------------ input ------------\n";
- print $in;
- print "\n------------ output -----------\n";
- print $back;
- print "\n------------ expected ---------\n";
- print $out;
- print "\n-------------------------------\n";
- $Text::Wrap::debug = 1;
- wrap(' ', ' ', $oi);
- exit(1);
- } else {
- print "not ok $tn\n";
- }
- $tn++;
- }
+ if ($back eq $out) {
+ print "ok $tn\n";
+ } elsif ($rerun) {
+ my $oi = $in;
+ foreach ($in, $back, $out) {
+ s/\t/^I\t/gs;
+ s/\n/\$\n/gs;
+ }
+ print "------------ input ------------\n";
+ print $in;
+ print "\n------------ output -----------\n";
+ print $back;
+ print "\n------------ expected ---------\n";
+ print $out;
+ print "\n-------------------------------\n";
+ $Text::Wrap::debug = 1;
+ wrap(' ', ' ', $oi);
+ exit(1);
+ } else {
+ print "not ok $tn\n";
+ }
+ $tn++;
}