File: stacktrace.t

package info (click to toggle)
libtest-exception-perl 0.29-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 156 kB
  • ctags: 21
  • sloc: perl: 473; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 410 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /usr/bin/perl -Tw

use strict;
use warnings;
use Sub::Uplevel;
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');