in reply to Testing error handling that calls "die"
# Check error messages $@ = ''; eval { my $str = format_eng() }; like($@, qr/requires numeric input/, 'die if no input'); $@ = ''; eval { my $str = format_eng(' ') }; like($@, qr/not numeric/, 'die if input only has whitespace');
|
---|