diff options
Diffstat (limited to 'Examples/test-suite/perl5/catches_strings_runme.pl')
-rw-r--r-- | Examples/test-suite/perl5/catches_strings_runme.pl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Examples/test-suite/perl5/catches_strings_runme.pl b/Examples/test-suite/perl5/catches_strings_runme.pl new file mode 100644 index 000000000..742b5bcab --- /dev/null +++ b/Examples/test-suite/perl5/catches_strings_runme.pl @@ -0,0 +1,15 @@ +use strict; +use warnings; +use Test::More tests => 4; +BEGIN { use_ok('catches_strings') } +require_ok('catches_strings'); + +eval { + catches_strings::StringsThrower::charstring(); +}; +like($@, qr/\bcharstring message/, "Should have thrown an exception"); + +eval { + catches_strings::StringsThrower::stdstring(); +}; +like($@, qr/\bstdstring message/, "Should have thrown an exception"); |