1use strict; use warnings; 2 3BEGIN { require './t/lib/ok.pl' } 4 5use Text::Wrap; 6 7print "1..2\n"; 8 9my $sentence = join "\x{a0}", qw( This sentence should never wrap. ); 10$Text::Wrap::columns = 2 * ( length $sentence ) - 4; 11 12my $in = join ' ', ( $sentence ) x 10; 13my $out = join "\n", ( $sentence ) x 10; 14my $got = eval { wrap('', '', $in) }; 15 16ok( !$@ ) or diag( $@ ); 17ok( $got eq $out ) or diag( $got ); 18