1use strict; use warnings; 2 3BEGIN { require './t/lib/ok.pl' } 4use Text::Wrap; 5 6#Causes Text::Wrap to die... 7 8my $toPrint = "(1) Category\t(2 or greater) New Category\n\n"; 9my $good = "(1) Category\t(2 or greater) New Category\n"; 10 11print "1..6\n"; 12 13local($Text::Wrap::break) = '\s'; 14eval { $toPrint = wrap("","",$toPrint); }; 15ok( !$@ ); 16ok( $toPrint eq $good ); 17 18local($Text::Wrap::break) = '\d'; 19eval { $toPrint = wrap("","",$toPrint); }; 20ok( !$@ ); 21ok( $toPrint eq $good ); 22 23local($Text::Wrap::break) = 'a'; 24eval { $toPrint = wrap("","",$toPrint); }; 25ok( !$@ ); 26ok( $toPrint eq $good ); 27 28