PATH:
usr
/
share
/
doc
/
perl-Test-Simple
/
t
/
Legacy
#!perl -w BEGIN { if( $ENV{PERL_CORE} ) { chdir 't'; @INC = '../lib'; } else { unshift @INC, 't/lib'; } } use strict; use Test::Builder; use Test::Builder::NoOutput; use Test::Simple; # TB methods expect to be wrapped my $ok = sub { shift->ok(@_) }; my $plan = sub { shift->plan(@_) }; my $done_testing = sub { shift->done_testing(@_) }; my $TB = Test::Builder->new; my $test = Test::Builder::NoOutput->create; $test->$plan( tests => 3 ); local $ENV{HARNESS_ACTIVE} = 0; $test->$ok(1, 'Foo'); $TB->is_eq($test->read(), <<END); 1..3 ok 1 - Foo END #line 30 $test->$ok(0, 'Bar'); $TB->is_eq($test->read(), <<END); not ok 2 - Bar # Failed test 'Bar' # at $0 line 30. END $test->$ok(1, 'Yar'); $test->$ok(1, 'Car'); $TB->is_eq($test->read(), <<END); ok 3 - Yar ok 4 - Car END #line 45 $test->$ok(0, 'Sar'); $TB->is_eq($test->read(), <<END); not ok 5 - Sar # Failed test 'Sar' # at $0 line 45. END $test->_ending(); $TB->is_eq($test->read(), <<END); # Looks like you planned 3 tests but ran 5. # Looks like you failed 2 tests of 5 run. END $TB->$done_testing(5);
[-] fail-more.t
[edit]
[-] overload.t
[edit]
[-] auto.t
[edit]
[-] exit.t
[edit]
[-] dont_overwrite_die_handler.t
[edit]
[-] plan_shouldnt_import.t
[edit]
[-] import.t
[edit]
[-] fork.t
[edit]
[-] BEGIN_require_ok.t
[edit]
[-] depth.t
[edit]
[-] tbm_doesnt_set_exported_to.t
[edit]
[-] strays.t
[edit]
[-] use_ok.t
[edit]
[-] is_deeply_with_threads.t
[edit]
[-] utf8.t
[edit]
[-] undef.t
[edit]
[+]
Test2
[-] died.t
[edit]
[-] plan_bad.t
[edit]
[-] thread_taint.t
[edit]
[-] bail_out.t
[edit]
[-] harness_active.t
[edit]
[-] plan_is_noplan.t
[edit]
[-] skip.t
[edit]
[-] threads.t
[edit]
[-] fail-like.t
[edit]
[-] fail_one.t
[edit]
[-] simple.t
[edit]
[-] explain_err_vars.t
[edit]
[-] no_log_results.t
[edit]
[-] skipall.t
[edit]
[-] is_deeply_dne_bug.t
[edit]
[-] More.t
[edit]
[-] buffer.t
[edit]
[-] versions.t
[edit]
[-] missing.t
[edit]
[-] c_flag.t
[edit]
[-] capture.t
[edit]
[-] circular_data.t
[edit]
[-] note.t
[edit]
[-] explain.t
[edit]
[-] no_tests.t
[edit]
[-] extra.t
[edit]
[-] 00test_harness_check.t
[edit]
[+]
Regression
[-] filehandles.t
[edit]
[-] todo.t
[edit]
[-] fail.t
[edit]
[-] 478-cmp_ok_hash.t
[edit]
[+]
Tester
[-] 01-basic.t
[edit]
[+]
Simple
[-] run_test.t
[edit]
[-] require_ok.t
[edit]
[-] new_ok.t
[edit]
[-] cmp_ok.t
[edit]
[-] overload_threads.t
[edit]
[-] diag.t
[edit]
[-] useing.t
[edit]
[+]
subtest
[-] plan.t
[edit]
[-] plan_skip_all.t
[edit]
[+]
Bugs
[-] extra_one.t
[edit]
[-] bad_plan.t
[edit]
[-] BEGIN_use_ok.t
[edit]
[-] no_plan.t
[edit]
[-] is_deeply_fail.t
[edit]
[+]
..
[-] plan_no_plan.t
[edit]
[-] check_tests.t
[edit]
[+]
Builder
[-] eq_set.t
[edit]