File: stacktrace.t

package info (click to toggle)
libtest-exception-perl 0.20-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 144 kB
  • ctags: 194
  • sloc: makefile: 459; perl: 328
file content (16 lines) | stat: -rw-r--r-- 377 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /usr/bin/perl -w

use strict;
use Carp;
use Test::Builder::Tester tests => 2;
use Test::More;

BEGIN { use_ok( 'Test::Exception' ) };

test_out('not ok 1 - threw /fribble/');
test_fail(+1);
throws_ok { confess('died') } '/fribble/';
my $exception = $@;
test_diag('expecting: /fribble/');
test_diag(split /\n/, "found: $exception");
test_test('regex in stacktrace ignored');