xref: /openbsd/gnu/usr.bin/perl/cpan/Text-Tabs/t/fill.t (revision 4bdff4be)
1use strict; use warnings;
2
3BEGIN { require './t/lib/ok.pl' }
4use Text::Wrap;
5
6my @tests = (split(/\nEND\n/s, <<DONE));
7TEST1
8Cyberdog Information
9
10Cyberdog & Netscape in the news
11Important Press Release regarding Cyberdog and Netscape. Check it out!
12
13Cyberdog Plug-in Support!
14Cyberdog support for Netscape Plug-ins is now available to download! Go
15to the Cyberdog Beta Download page and download it now!
16
17Cyberdog Book
18Check out Jesse Feiler's way-cool book about Cyberdog. You can find
19details out about the book as well as ordering information at Philmont
20Software Mill site.
21
22Java!
23Looking to view Java applets in Cyberdog 1.1 Beta 3? Download and install
24the Mac OS Runtime for Java and try it out!
25
26Cyberdog 1.1 Beta 3
27We hope that Cyberdog and OpenDoc 1.1 will be available within the next
28two weeks. In the meantime, we have released another version of
29Cyberdog, Cyberdog 1.1 Beta 3. This version fixes several bugs that were
30reported to us during out public beta period. You can check out our release
31notes to see what we fixed!
32END
33    Cyberdog Information
34    Cyberdog & Netscape in the news Important Press Release regarding
35 Cyberdog and Netscape. Check it out!
36    Cyberdog Plug-in Support! Cyberdog support for Netscape Plug-ins is now
37 available to download! Go to the Cyberdog Beta Download page and download
38 it now!
39    Cyberdog Book Check out Jesse Feiler's way-cool book about Cyberdog.
40 You can find details out about the book as well as ordering information at
41 Philmont Software Mill site.
42    Java! Looking to view Java applets in Cyberdog 1.1 Beta 3? Download and
43 install the Mac OS Runtime for Java and try it out!
44    Cyberdog 1.1 Beta 3 We hope that Cyberdog and OpenDoc 1.1 will be
45 available within the next two weeks. In the meantime, we have released
46 another version of Cyberdog, Cyberdog 1.1 Beta 3. This version fixes
47 several bugs that were reported to us during out public beta period. You
48 can check out our release notes to see what we fixed!
49END
50DONE
51
52
53my $numtests = scalar(@tests) / 2;
54print "1..$numtests\n";
55
56while (@tests) {
57	my $in = shift(@tests);
58	my $out = shift(@tests);
59
60	$in =~ s/^TEST(\d+)?\n//;
61
62	my $back = fill('    ', ' ', $in);
63
64	ok( $back eq $out );
65}
66