xref: /openbsd/gnu/usr.bin/perl/cpan/Text-Tabs/t/undef.t (revision 256a93a4)
1use strict; use warnings;
2
3BEGIN { require './t/lib/ok.pl' }
4use Text::Tabs;
5use Text::Wrap;
6
7print "1..4\n";
8
9my $w; $SIG{'__WARN__'} = sub { $w = join '', @_ };
10
11sub cleanup { diag $w; undef $w }
12
13expand( undef );
14ok( !defined $w, 'expand accepts undef silently' ) or cleanup;
15
16unexpand( undef, undef, undef );
17ok( !defined $w, 'unexpand accepts undef silently' ) or cleanup;
18
19wrap( undef, undef, undef, ( ( "abc " x 20 ) . "abc\n" ) x 5, undef );
20ok( !defined $w, 'wrap accepts undef silently' ) or cleanup;
21
22fill( undef, undef, undef, ( ( "abc " x 20 ) . "abc\n" ) x 5, undef );
23ok( !defined $w, 'fill accepts undef silently' ) or cleanup;
24