6 use Test::More tests => 5;
13 #todo_skip 'Harness compatibility incomplete', 5;
14 #local $TODO = 'Harness compatibility incomplete';
17 sub prepare_for_death {
19 return sub { $died = 1 }
22 my $curdir = File::Spec->curdir;
25 ? File::Spec->catdir( $curdir, 'lib', 'sample-tests' )
26 : File::Spec->catdir( $curdir, 't', 'sample-tests' );
29 local $SIG{__DIE__} = prepare_for_death();
30 eval { _runtests( File::Spec->catfile( $sample_tests, "simple" ) ); };
31 ok( !$@, "simple lives" );
32 is( $died, 0, "Death never happened" );
36 local $SIG{__DIE__} = prepare_for_death();
38 _runtests( File::Spec->catfile( $sample_tests, "too_many" ) );
41 ok( $@ =~ m[Failed 1/1], "too_many dies" );
42 is( $died, 1, "Death happened" );
49 local $ENV{PERL_TEST_HARNESS_DUMP_TAP} = 0;
50 local $ENV{HARNESS_VERBOSE} = 0;
51 local $ENV{HARNESS_DEBUG} = 0;
52 local $ENV{HARNESS_TIMER} = 0;
54 local $Test::Harness::Verbose = -9;
59 # vim:ts=4:sw=4:et:sta