allow AV/HV dereferences on pseudohashes ($ph->{foo}[1], etc.)
[p5sagit/p5-mst-13.2.git] / t / lib / textfill.t
CommitLineData
67137b9c 1#!./perl -w
2
3BEGIN {
4 chdir 't' if -d 't';
93430cb4 5 unshift @INC, '../lib';
67137b9c 6}
0c5a43b5 7
8@tests = (split(/\nEND\n/s, <<DONE));
9TEST1
10Cyberdog Information
11
12Cyberdog & Netscape in the news
13Important Press Release regarding Cyberdog and Netscape. Check it out!
14
15Cyberdog Plug-in Support!
16Cyberdog support for Netscape Plug-ins is now available to download! Go
17to the Cyberdog Beta Download page and download it now!
18
19Cyberdog Book
20Check out Jesse Feiler's way-cool book about Cyberdog. You can find
21details out about the book as well as ordering information at Philmont
22Software Mill site.
23
24Java!
25Looking to view Java applets in Cyberdog 1.1 Beta 3? Download and install
26the Mac OS Runtime for Java and try it out!
27
28Cyberdog 1.1 Beta 3
29We hope that Cyberdog and OpenDoc 1.1 will be available within the next
30two weeks. In the meantime, we have released another version of
31Cyberdog, Cyberdog 1.1 Beta 3. This version fixes several bugs that were
32reported to us during out public beta period. You can check out our release
33notes to see what we fixed!
34END
35 Cyberdog Information
36 Cyberdog & Netscape in the news Important Press Release regarding
37 Cyberdog and Netscape. Check it out!
38 Cyberdog Plug-in Support! Cyberdog support for Netscape Plug-ins is now
39 available to download! Go to the Cyberdog Beta Download page and download
40 it now!
41 Cyberdog Book Check out Jesse Feiler's way-cool book about Cyberdog.
42 You can find details out about the book as well as ordering information at
43 Philmont Software Mill site.
44 Java! Looking to view Java applets in Cyberdog 1.1 Beta 3? Download and
45 install the Mac OS Runtime for Java and try it out!
46 Cyberdog 1.1 Beta 3 We hope that Cyberdog and OpenDoc 1.1 will be
47 available within the next two weeks. In the meantime, we have released
48 another version of Cyberdog, Cyberdog 1.1 Beta 3. This version fixes
49 several bugs that were reported to us during out public beta period. You
50 can check out our release notes to see what we fixed!
51END
52DONE
53
54
55$| = 1;
56
3937c24e 57print "1..", @tests/2, "\n";
0c5a43b5 58
ce231f4e 59use Text::Wrap;
60
0c5a43b5 61$rerun = $ENV{'PERL_DL_NONLAZY'} ? 0 : 1;
62
63$tn = 1;
64while (@tests) {
65 my $in = shift(@tests);
66 my $out = shift(@tests);
67
68 $in =~ s/^TEST(\d+)?\n//;
69
70 my $back = fill(' ', ' ', $in);
71
72 if ($back eq $out) {
73 print "ok $tn\n";
74 } elsif ($rerun) {
75 my $oi = $in;
9728b48b 76 open(F,">#o") and do { print F $back; close(F) };
77 open(F,">#e") and do { print F $out; close(F) };
0c5a43b5 78 foreach ($in, $back, $out) {
79 s/\t/^I\t/gs;
80 s/\n/\$\n/gs;
81 }
82 print "------------ input ------------\n";
83 print $in;
84 print "\n------------ output -----------\n";
85 print $back;
86 print "\n------------ expected ---------\n";
87 print $out;
88 print "\n-------------------------------\n";
89 $Text::Wrap::debug = 1;
90 fill(' ', ' ', $oi);
91 exit(1);
92 } else {
93 print "not ok $tn\n";
94 }
95 $tn++;
96}