File: die_before_plan.t

package info (click to toggle)
libtest-class-perl 0.35-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 476 kB
  • ctags: 102
  • sloc: perl: 1,668; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 589 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /usr/bin/perl -T

use strict;
use warnings;
use Test;
use Test::Builder::Tester tests => 1;

package Object::Test;
use base 'Test::Class';
use Test::More;

sub setup : Test(setup) {
	die "died before plan set\n";
};

sub test : Test {
	ok(1==1, 'test just here to get setup method run');
};


package main;

$ENV{TEST_VERBOSE}=0;

test_out("not ok 1 - setup (for test method 'test') died (died before plan set)");
test_fail(+3);
test_err( "#   (in Object::Test->setup)" );
test_out("ok 2 - test just here to get setup method run");
Object::Test->runtests;
test_test("die before plan");