/usr/share/doc/perl-Test-Simple/t/Legacy
#!perl -w BEGIN { if( $ENV{PERL_CORE} ) { chdir 't'; @INC = ('../lib', 'lib'); } else { unshift @INC, 't/lib'; } } use strict; use Test::Simple::Catch; my($out, $err) = Test::Simple::Catch::caught(); # Can't use Test.pm, that's a 5.005 thing. package My::Test; # This has to be a require or else the END block below runs before # Test::Builder's own and the ending diagnostics don't come out right. require Test::Builder; my $TB = Test::Builder->create; $TB->plan(tests => 4); # Utility testing functions. sub ok ($;$) { return $TB->ok(@_); } sub main::err_ok ($) { my($expect) = @_; my $got = $err->read; return $TB->is_eq( $got, $expect ); } package main; require Test::More; Test::More->import(tests => 4); Test::More->builder->no_ending(1); { local $ENV{HARNESS_ACTIVE} = 0; local $ENV{HARNESS_IS_VERBOSE} = 0; #line 62 fail( "this fails" ); err_ok( <<ERR ); # Failed test 'this fails' # at $0 line 62. ERR #line 72 is( 1, 0 ); err_ok( <<ERR ); # Failed test at $0 line 72. # got: '1' # expected: '0' ERR } { local $ENV{HARNESS_ACTIVE} = 1; local $ENV{HARNESS_IS_VERBOSE} = 0; #line 71 fail( "this fails" ); err_ok( <<ERR ); # Failed test 'this fails' # at $0 line 71. ERR #line 84 is( 1, 0 ); err_ok( <<ERR ); # Failed test at $0 line 84. # got: '1' # expected: '0' ERR }
.
Edit
..
Edit
00test_harness_check.t
Edit
01-basic.t
Edit
478-cmp_ok_hash.t
Edit
BEGIN_require_ok.t
Edit
BEGIN_use_ok.t
Edit
Bugs
Edit
Builder
Edit
More.t
Edit
Regression
Edit
Simple
Edit
Test2
Edit
Tester
Edit
auto.t
Edit
bad_plan.t
Edit
bail_out.t
Edit
buffer.t
Edit
c_flag.t
Edit
capture.t
Edit
check_tests.t
Edit
circular_data.t
Edit
cmp_ok.t
Edit
depth.t
Edit
diag.t
Edit
died.t
Edit
dont_overwrite_die_handler.t
Edit
eq_set.t
Edit
exit.t
Edit
explain.t
Edit
explain_err_vars.t
Edit
extra.t
Edit
extra_one.t
Edit
fail-like.t
Edit
fail-more.t
Edit
fail.t
Edit
fail_one.t
Edit
filehandles.t
Edit
fork.t
Edit
harness_active.t
Edit
import.t
Edit
is_deeply_dne_bug.t
Edit
is_deeply_fail.t
Edit
is_deeply_with_threads.t
Edit
missing.t
Edit
new_ok.t
Edit
no_log_results.t
Edit
no_plan.t
Edit
no_tests.t
Edit
note.t
Edit
overload.t
Edit
overload_threads.t
Edit
plan.t
Edit
plan_bad.t
Edit
plan_is_noplan.t
Edit
plan_no_plan.t
Edit
plan_shouldnt_import.t
Edit
plan_skip_all.t
Edit
require_ok.t
Edit
run_test.t
Edit
simple.t
Edit
skip.t
Edit
skipall.t
Edit
strays.t
Edit
subtest
Edit
tbm_doesnt_set_exported_to.t
Edit
thread_taint.t
Edit
threads.t
Edit
todo.t
Edit
undef.t
Edit
use_ok.t
Edit
useing.t
Edit
utf8.t
Edit
versions.t
Edit