1#!/usr/bin/perl -I. 2 3#Causes Text::Wrap to die... 4use warnings; 5use strict; 6use Text::Wrap; 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 11my $toprint; 12 13print "1..6\n"; 14 15local($Text::Wrap::break) = '\s'; 16eval { $toPrint = wrap("","",$toPrint); }; 17print $@ ? "not ok 1\n" : "ok 1\n"; 18print $toPrint eq $good ? "ok 2\n" : "not ok 2\n"; 19 20local($Text::Wrap::break) = '\d'; 21eval { $toPrint = wrap("","",$toPrint); }; 22print $@ ? "not ok 3\n" : "ok 3\n"; 23print $toPrint eq $good ? "ok 4\n" : "not ok 4\n"; 24 25local($Text::Wrap::break) = 'a'; 26eval { $toPrint = wrap("","",$toPrint); }; 27print $@ ? "not ok 5\n" : "ok 5\n"; 28print $toPrint eq $good ? "ok 6\n" : "not ok 6\n"; 29 30