summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Granum <chad.granum@dreamhost.com>2014-08-18 14:04:14 -0700
committerJames E Keenan <jkeenan@cpan.org>2014-08-19 04:18:51 +0200
commit59c96aebdd56baf5d1979103046b1c6d4e308aa2 (patch)
treed02a5c4615f8e48979155a604b4ecc483c1678f3
parentb756670be058f7cc0c59bf2f7325312e76c72542 (diff)
downloadperl-59c96aebdd56baf5d1979103046b1c6d4e308aa2.tar.gz
Update blead to Test::Builder alpha 40
Fixes performance issues Fixes a test failure specific to certain utf8 conditions Fixes a broken win32+fork test Committer's notes: 2nd Test-Simple patch applied; corresponds to $Test::Simple::VERSION 1.301001_040
-rw-r--r--MANIFEST412
-rwxr-xr-xMakefile.SH4
-rw-r--r--cpan/Test-Simple/lib/Test/Builder.pm119
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Event.pm (renamed from cpan/Test-Simple/lib/Test/Builder/Result.pm)24
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Event/Bail.pm (renamed from cpan/Test-Simple/lib/Test/Builder/Result/Bail.pm)24
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Event/Child.pm (renamed from cpan/Test-Simple/lib/Test/Builder/Result/Child.pm)24
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Event/Diag.pm (renamed from cpan/Test-Simple/lib/Test/Builder/Result/Diag.pm)28
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Event/Finish.pm (renamed from cpan/Test-Simple/lib/Test/Builder/Result/Finish.pm)24
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Event/Note.pm (renamed from cpan/Test-Simple/lib/Test/Builder/Result/Note.pm)24
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Event/Ok.pm (renamed from cpan/Test-Simple/lib/Test/Builder/Result/Ok.pm)40
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Event/Plan.pm (renamed from cpan/Test-Simple/lib/Test/Builder/Result/Plan.pm)26
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/ExitMagic.pm4
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Fork.pm20
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Formatter.pm36
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Formatter/LegacyResults.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Formatter/TAP.pm36
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Module.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Provider.pm14
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Stream.pm56
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Tester.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Trace.pm214
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Trace/Frame.pm36
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Util.pm35
-rw-r--r--cpan/Test-Simple/lib/Test/More.pm19
-rw-r--r--cpan/Test-Simple/lib/Test/Simple.pm8
-rw-r--r--cpan/Test-Simple/lib/Test/Tester.pm4
-rw-r--r--cpan/Test-Simple/lib/Test/Tester2.pm225
-rw-r--r--cpan/Test-Simple/lib/Test/use/ok.pm2
-rw-r--r--cpan/Test-Simple/lib/ok.pm2
-rw-r--r--cpan/Test-Simple/t/00test_harness_check.t26
-rw-r--r--cpan/Test-Simple/t/Modern/Builder_Event.t (renamed from cpan/Test-Simple/t/Modern/Builder_Result.t)15
-rw-r--r--cpan/Test-Simple/t/Modern/Builder_Event_Child.t (renamed from cpan/Test-Simple/t/Modern/Builder_Result_Child.t)8
-rw-r--r--cpan/Test-Simple/t/Modern/Builder_Event_Diag.t (renamed from cpan/Test-Simple/t/Modern/Builder_Result_Diag.t)16
-rw-r--r--cpan/Test-Simple/t/Modern/Builder_Event_Finish.t15
-rw-r--r--cpan/Test-Simple/t/Modern/Builder_Event_Note.t17
-rw-r--r--cpan/Test-Simple/t/Modern/Builder_Event_Ok.t (renamed from cpan/Test-Simple/t/Modern/Builder_Result_Ok.t)33
-rw-r--r--cpan/Test-Simple/t/Modern/Builder_Event_Plan.t (renamed from cpan/Test-Simple/t/Modern/Builder_Result_Plan.t)8
-rw-r--r--cpan/Test-Simple/t/Modern/Builder_Fork.t23
-rw-r--r--cpan/Test-Simple/t/Modern/Builder_Result_Finish.t15
-rw-r--r--cpan/Test-Simple/t/Modern/Builder_Result_Note.t17
-rw-r--r--cpan/Test-Simple/t/Modern/Builder_Trace_Frame.t46
-rw-r--r--cpan/Test-Simple/t/Modern/More.t58
-rw-r--r--cpan/Test-Simple/t/Modern/NotTB15.t1
-rw-r--r--cpan/Test-Simple/t/Modern/Simple.t9
-rw-r--r--cpan/Test-Simple/t/Modern/Tester2.t107
-rw-r--r--cpan/Test-Simple/t/Modern/Tester2_subtest.t8
-rw-r--r--cpan/Test-Simple/t/Modern/encoding_test.t4
-rw-r--r--cpan/Test-Simple/t/Modern/tracing.t95
-rw-r--r--cpan/Test-Simple/t/TTLegacy/depth.t1
-rw-r--r--cpan/Test-Simple/t/TTLegacy/run_test.t1
-rw-r--r--cpan/Test-Simple/t/pod-coverage.t29
-rw-r--r--cpan/Test-Simple/t/ribasushi_diag.t8
-rw-r--r--cpan/Test-Simple/t/versions.t17
54 files changed, 1038 insertions, 1007 deletions
diff --git a/MANIFEST b/MANIFEST
index 4ef6fda1d5..e735301391 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2233,214 +2233,212 @@ cpan/Test-Harness/t/yamlish-output.t Test::Harness test
cpan/Test-Harness/t/yamlish.t Test::Harness test
cpan/Test-Harness/t/yamlish-writer.t Test::Harness test
cpan/Test/lib/Test.pm A simple framework for writing test scripts
-cpan/Test-Simple/lib/ok.pm Tool for testing module loading
-cpan/Test-Simple/lib/Test/Builder/ExitMagic.pm Handle $? when tests exit
-cpan/Test-Simple/lib/Test/Builder/Fork.pm Forking support for Test::Builder
-cpan/Test-Simple/lib/Test/Builder/Formatter/LegacyResults.pm Legacy support
-cpan/Test-Simple/lib/Test/Builder/Formatter.pm Base class for formatters
-cpan/Test-Simple/lib/Test/Builder/Formatter/TAP.pm TAP formatter
-cpan/Test-Simple/lib/Test/Builder/Module.pm Deprecated tester base class
-cpan/Test-Simple/lib/Test/Builder.pm The meat of Test::Builder
-cpan/Test-Simple/lib/Test/Builder/Provider.pm Tool for building testers
-cpan/Test-Simple/lib/Test/Builder/Result/Bail.pm Bail result
-cpan/Test-Simple/lib/Test/Builder/Result/Child.pm Child result
-cpan/Test-Simple/lib/Test/Builder/Result/Diag.pm Diag result
-cpan/Test-Simple/lib/Test/Builder/Result/Finish.pm Finish result
-cpan/Test-Simple/lib/Test/Builder/Result/Note.pm Note result
-cpan/Test-Simple/lib/Test/Builder/Result/Ok.pm Ok result
-cpan/Test-Simple/lib/Test/Builder/Result/Plan.pm Plan result
-cpan/Test-Simple/lib/Test/Builder/Result.pm Result base class
-cpan/Test-Simple/lib/Test/Builder/Stream.pm The test stream
-cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm Part of Test::Tester
-cpan/Test-Simple/lib/Test/Builder/Tester.pm Tool for validating testers
-cpan/Test-Simple/lib/Test/Builder/Threads.pm Thread utisl for Test::Builder
-cpan/Test-Simple/lib/Test/Builder/Trace/Frame.pm Frame in a stack trace
-cpan/Test-Simple/lib/Test/Builder/Trace.pm Tool for building and analyzing stack traces
-cpan/Test-Simple/lib/Test/Builder/Util.pm Common utils used throughout Test::Builder
-cpan/Test-Simple/lib/Test/FAQ.pod Frequently Asked Questions
-cpan/Test-Simple/lib/Test/More.pm More tools for testing
-cpan/Test-Simple/lib/Test/Simple.pm tools for testing
-cpan/Test-Simple/lib/Test/Tester2.pm Tool for testing testers
-cpan/Test-Simple/lib/Test/Tester/Capture.pm Part of Test::Tester
-cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm Part of Test::Tester
-cpan/Test-Simple/lib/Test/Tester/Delegate.pm Part of Test::Tester
-cpan/Test-Simple/lib/Test/Tester.pm Tool for testing testers
+cpan/Test-Simple/lib/ok.pm ok tool
+cpan/Test-Simple/lib/Test/Builder/Event/Bail.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Event/Child.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Event/Diag.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Event/Finish.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Event/Note.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Event/Ok.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Event/Plan.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Event.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/ExitMagic.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Fork.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Formatter/LegacyResults.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Formatter.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Formatter/TAP.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Module.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder.pm Test::Builder
+cpan/Test-Simple/lib/Test/Builder/Provider.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Stream.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Tester.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Threads.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Trace/Frame.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Trace.pm Test::Builder module
+cpan/Test-Simple/lib/Test/Builder/Util.pm Test::Builder module
+cpan/Test-Simple/lib/Test/FAQ.pod Testing FAQ
+cpan/Test-Simple/lib/Test/More.pm Test::More
+cpan/Test-Simple/lib/Test/Simple.pm Test::Simple
+cpan/Test-Simple/lib/Test/Tester2.pm Test::Tester2
+cpan/Test-Simple/lib/Test/Tester/Capture.pm Test::Tester module
+cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm Test::Tester module
+cpan/Test-Simple/lib/Test/Tester/Delegate.pm Test::Tester module
+cpan/Test-Simple/lib/Test/Tester.pm Test::Tester
cpan/Test-Simple/lib/Test/Tutorial.pod Testing Tutorial
-cpan/Test-Simple/lib/Test/use/ok.pm Tool for testing module loading
-cpan/Test-Simple/t/00test_harness_check.t Test::Builder legacy test
-cpan/Test-Simple/t/bad_plan.t Test::Builder legacy test
-cpan/Test-Simple/t/bail_out.t Test::Builder legacy test
-cpan/Test-Simple/t/BEGIN_require_ok.t Test::Builder legacy test
-cpan/Test-Simple/t/BEGIN_use_ok.t Test::Builder legacy test
-cpan/Test-Simple/t/buffer.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/Builder.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/carp.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/create.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/current_test.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/current_test_without_plan.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/details.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/done_testing_double.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/done_testing_plan_mismatch.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/done_testing.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/done_testing_with_no_plan.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/done_testing_with_number.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/done_testing_with_plan.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/fork_with_new_stdout.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/has_plan2.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/has_plan.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/is_fh.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/is_passing.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/maybe_regex.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/no_diag.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/no_ending.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/no_header.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/no_plan_at_all.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/ok_obj.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/output.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/reset_outputs.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/reset.t Test::Builder legacy test
-cpan/Test-Simple/t/Builder/try.t Test::Builder legacy test
-cpan/Test-Simple/t/c_flag.t Test::Builder legacy test
-cpan/Test-Simple/t/circular_data.t Test::Builder legacy test
-cpan/Test-Simple/t/cmp_ok.t Test::Builder legacy test
-cpan/Test-Simple/t/dependents.t Test::Builder legacy test
-cpan/Test-Simple/t/diag.t Test::Builder legacy test
-cpan/Test-Simple/t/died.t Test::Builder legacy test
-cpan/Test-Simple/t/dont_overwrite_die_handler.t Test::Builder legacy test
-cpan/Test-Simple/t/eq_set.t Test::Builder legacy test
-cpan/Test-Simple/t/exit.t Test::Builder legacy test
-cpan/Test-Simple/t/explain.t Test::Builder legacy test
-cpan/Test-Simple/t/extra_one.t Test::Builder legacy test
-cpan/Test-Simple/t/extra.t Test::Builder legacy test
-cpan/Test-Simple/t/fail-like.t Test::Builder legacy test
-cpan/Test-Simple/t/fail-more.t Test::Builder legacy test
-cpan/Test-Simple/t/fail_one.t Test::Builder legacy test
-cpan/Test-Simple/t/fail.t Test::Builder legacy test
-cpan/Test-Simple/t/filehandles.t Test::Builder legacy test
-cpan/Test-Simple/t/fork.t Test::Builder legacy test
-cpan/Test-Simple/t/harness_active.t Test::Builder legacy test
-cpan/Test-Simple/t/import.t Test::Builder legacy test
-cpan/Test-Simple/t/is_deeply_dne_bug.t Test::Builder legacy test
-cpan/Test-Simple/t/is_deeply_fail.t Test::Builder legacy test
-cpan/Test-Simple/t/is_deeply_with_threads.t Test::Builder legacy test
-cpan/Test-Simple/t/lib/Dev/Null.pm Test helper module
-cpan/Test-Simple/t/lib/Dummy.pm Test helper module
-cpan/Test-Simple/t/lib/MyOverload.pm Test helper module
-cpan/Test-Simple/t/lib/MyTest.pm Test helper module
-cpan/Test-Simple/t/lib/NoExporter.pm Test helper module
-cpan/Test-Simple/t/lib/SigDie.pm Test helper module
-cpan/Test-Simple/t/lib/SmallTest.pm Test helper module
-cpan/Test-Simple/t/lib/Test/Builder/NoOutput.pm Test helper module
-cpan/Test-Simple/t/lib/Test/Simple/Catch.pm Test helper module
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/death_in_eval.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/death.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/death_with_handler.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/exit.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/extras.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/five_fail.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/last_minute_death.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/missing_done_testing.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/one_fail.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/one_fail_without_plan.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/pre_plan_death.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/require.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/success.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/too_few_fail.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/too_few.plx Sample test used in tests
-cpan/Test-Simple/t/lib/Test/Simple/sample_tests/two_fail.plx Sample test used in tests
-cpan/Test-Simple/t/lib/TieOut.pm Test helper module
-cpan/Test-Simple/t/missing.t Test::Builder legacy test
-cpan/Test-Simple/t/Modern/Builder_Fork.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Formatter.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Formatter_TAP.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Module.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Provider.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Result_Child.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Result_Diag.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Result_Finish.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Result_Note.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Result_Ok.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Result_Plan.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Result.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Stream.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Tester.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Trace_Frame.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Trace.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Builder_Util.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/encoding_test.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/More.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/NotTB15.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Simple.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Tester2_subtest.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/Tester2.t Test for modern Test::Builder features
-cpan/Test-Simple/t/Modern/tracing.t Test for modern Test::Builder features
-cpan/Test-Simple/t/More.t Legacy test for Test::Builder
-cpan/Test-Simple/t/new_ok.t Legacy test for Test::Builder
-cpan/Test-Simple/t/no_plan.t Legacy test for Test::Builder
-cpan/Test-Simple/t/no_tests.t Legacy test for Test::Builder
-cpan/Test-Simple/t/note.t Legacy test for Test::Builder
-cpan/Test-Simple/t/overload.t Legacy test for Test::Builder
-cpan/Test-Simple/t/overload_threads.t Legacy test for Test::Builder
-cpan/Test-Simple/t/PerlIO.t Legacy test for Test::Builder
-cpan/Test-Simple/t/plan_bad.t Legacy test for Test::Builder
-cpan/Test-Simple/t/plan_is_noplan.t Legacy test for Test::Builder
-cpan/Test-Simple/t/plan_no_plan.t Legacy test for Test::Builder
-cpan/Test-Simple/t/plan_shouldnt_import.t Legacy test for Test::Builder
-cpan/Test-Simple/t/plan_skip_all.t Legacy test for Test::Builder
-cpan/Test-Simple/t/plan.t Legacy test for Test::Builder
-cpan/Test-Simple/t/pod-coverage.t Legacy test for Test::Builder
-cpan/Test-Simple/t/pod.t Legacy test for Test::Builder
-cpan/Test-Simple/t/require_ok.t Legacy test for Test::Builder
-cpan/Test-Simple/t/ribasushi_diag.t Legacy test for Test::Builder
-cpan/Test-Simple/t/ribasushi_threads.t Legacy test for Test::Builder
-cpan/Test-Simple/t/Simple/load.t Legacy test for Test::Builder
-cpan/Test-Simple/t/simple.t Legacy test for Test::Builder
-cpan/Test-Simple/t/skipall.t Legacy test for Test::Builder
-cpan/Test-Simple/t/skip.t Legacy test for Test::Builder
-cpan/Test-Simple/t/strays.t Legacy test for Test::Builder
-cpan/Test-Simple/t/subtest/args.t Legacy subtest test
-cpan/Test-Simple/t/subtest/bail_out.t Legacy subtest test
-cpan/Test-Simple/t/subtest/basic.t Legacy subtest test
-cpan/Test-Simple/t/subtest/die.t Legacy subtest test
-cpan/Test-Simple/t/subtest/do.t Legacy subtest test
-cpan/Test-Simple/t/subtest/exceptions.t Legacy subtest test
-cpan/Test-Simple/t/subtest/for_do_t.test Legacy subtest test
-cpan/Test-Simple/t/subtest/fork.t Legacy subtest test
-cpan/Test-Simple/t/subtest/implicit_done.t Legacy subtest test
-cpan/Test-Simple/t/subtest/line_numbers.t Legacy subtest test
-cpan/Test-Simple/t/subtest/plan.t Legacy subtest test
-cpan/Test-Simple/t/subtest/predicate.t Legacy subtest test
-cpan/Test-Simple/t/subtest/singleton.t Legacy subtest test
-cpan/Test-Simple/t/subtest/threads.t Legacy subtest test
-cpan/Test-Simple/t/subtest/todo.t Legacy subtest test
-cpan/Test-Simple/t/subtest/wstat.t Legacy subtest test
-cpan/Test-Simple/t/tbm_doesnt_set_exported_to.t Legacy test
-cpan/Test-Simple/t/Tester/tbt_01basic.t Test::Builder::Tester test
-cpan/Test-Simple/t/Tester/tbt_02fhrestore.t Test::Builder::Tester test
-cpan/Test-Simple/t/Tester/tbt_03die.t Test::Builder::Tester test
-cpan/Test-Simple/t/Tester/tbt_04line_num.t Test::Builder::Tester test
-cpan/Test-Simple/t/Tester/tbt_05faildiag.t Test::Builder::Tester test
-cpan/Test-Simple/t/Tester/tbt_06errormess.t Test::Builder::Tester test
-cpan/Test-Simple/t/Tester/tbt_07args.t Test::Builder::Tester test
-cpan/Test-Simple/t/Tester/tbt_08subtest.t Test::Builder::Tester test
-cpan/Test-Simple/t/Tester/tbt_09do_script.pl Test::Builder::Tester test
-cpan/Test-Simple/t/Tester/tbt_09do.t Test::Builder::Tester test
-cpan/Test-Simple/t/Tester/tbt_is_bug.t Test::Builder::Tester test
-cpan/Test-Simple/t/test_use_ok.t Legacy Test::Builder::Test
-cpan/Test-Simple/t/threads.t Legacy Test::Builder::Test
-cpan/Test-Simple/t/thread_taint.t Legacy Test::Builder::Test
-cpan/Test-Simple/t/todo.t Legacy Test::Builder::Test
-cpan/Test-Simple/t/TTLegacy/auto.t Test for old Test::Tester
-cpan/Test-Simple/t/TTLegacy/capture.t Test for old Test::Tester
-cpan/Test-Simple/t/TTLegacy/check_tests.t Test for old Test::Tester
-cpan/Test-Simple/t/TTLegacy/depth.t Test for old Test::Tester
-cpan/Test-Simple/t/TTLegacy/run_test.t Test for old Test::Tester
-cpan/Test-Simple/t/undef.t Legacy Test::Builder test
-cpan/Test-Simple/t/useing.t Legacy Test::Builder test
-cpan/Test-Simple/t/use_ok.t Legacy Test::Builder test
-cpan/Test-Simple/t/utf8.t Legacy Test::Builder test
-cpan/Test-Simple/t/versions.t Test for Test::Builder version numbers
+cpan/Test-Simple/lib/Test/use/ok.pm ok.pm documentation
+cpan/Test-Simple/t/bad_plan.t Test-Simple test
+cpan/Test-Simple/t/bail_out.t Test-Simple test
+cpan/Test-Simple/t/BEGIN_require_ok.t Test-Simple test
+cpan/Test-Simple/t/BEGIN_use_ok.t Test-Simple test
+cpan/Test-Simple/t/buffer.t Test-Simple test
+cpan/Test-Simple/t/Builder/Builder.t Test-Simple test
+cpan/Test-Simple/t/Builder/carp.t Test-Simple test
+cpan/Test-Simple/t/Builder/create.t Test-Simple test
+cpan/Test-Simple/t/Builder/current_test.t Test-Simple test
+cpan/Test-Simple/t/Builder/current_test_without_plan.t Test-Simple test
+cpan/Test-Simple/t/Builder/details.t Test-Simple test
+cpan/Test-Simple/t/Builder/done_testing_double.t Test-Simple test
+cpan/Test-Simple/t/Builder/done_testing_plan_mismatch.t Test-Simple test
+cpan/Test-Simple/t/Builder/done_testing.t Test-Simple test
+cpan/Test-Simple/t/Builder/done_testing_with_no_plan.t Test-Simple test
+cpan/Test-Simple/t/Builder/done_testing_with_number.t Test-Simple test
+cpan/Test-Simple/t/Builder/done_testing_with_plan.t Test-Simple test
+cpan/Test-Simple/t/Builder/fork_with_new_stdout.t Test-Simple test
+cpan/Test-Simple/t/Builder/has_plan2.t Test-Simple test
+cpan/Test-Simple/t/Builder/has_plan.t Test-Simple test
+cpan/Test-Simple/t/Builder/is_fh.t Test-Simple test
+cpan/Test-Simple/t/Builder/is_passing.t Test-Simple test
+cpan/Test-Simple/t/Builder/maybe_regex.t Test-Simple test
+cpan/Test-Simple/t/Builder/no_diag.t Test-Simple test
+cpan/Test-Simple/t/Builder/no_ending.t Test-Simple test
+cpan/Test-Simple/t/Builder/no_header.t Test-Simple test
+cpan/Test-Simple/t/Builder/no_plan_at_all.t Test-Simple test
+cpan/Test-Simple/t/Builder/ok_obj.t Test-Simple test
+cpan/Test-Simple/t/Builder/output.t Test-Simple test
+cpan/Test-Simple/t/Builder/reset_outputs.t Test-Simple test
+cpan/Test-Simple/t/Builder/reset.t Test-Simple test
+cpan/Test-Simple/t/Builder/try.t Test-Simple test
+cpan/Test-Simple/t/c_flag.t Test-Simple test
+cpan/Test-Simple/t/circular_data.t Test-Simple test
+cpan/Test-Simple/t/cmp_ok.t Test-Simple test
+cpan/Test-Simple/t/dependents.t Test-Simple test
+cpan/Test-Simple/t/diag.t Test-Simple test
+cpan/Test-Simple/t/died.t Test-Simple test
+cpan/Test-Simple/t/dont_overwrite_die_handler.t Test-Simple test
+cpan/Test-Simple/t/eq_set.t Test-Simple test
+cpan/Test-Simple/t/exit.t Test-Simple test
+cpan/Test-Simple/t/explain.t Test-Simple test
+cpan/Test-Simple/t/extra_one.t Test-Simple test
+cpan/Test-Simple/t/extra.t Test-Simple test
+cpan/Test-Simple/t/fail-like.t Test-Simple test
+cpan/Test-Simple/t/fail-more.t Test-Simple test
+cpan/Test-Simple/t/fail_one.t Test-Simple test
+cpan/Test-Simple/t/fail.t Test-Simple test
+cpan/Test-Simple/t/filehandles.t Test-Simple test
+cpan/Test-Simple/t/fork.t Test-Simple test
+cpan/Test-Simple/t/harness_active.t Test-Simple test
+cpan/Test-Simple/t/import.t Test-Simple test
+cpan/Test-Simple/t/is_deeply_dne_bug.t Test-Simple test
+cpan/Test-Simple/t/is_deeply_fail.t Test-Simple test
+cpan/Test-Simple/t/is_deeply_with_threads.t Test-Simple test
+cpan/Test-Simple/t/lib/Dev/Null.pm Test-Simple test
+cpan/Test-Simple/t/lib/Dummy.pm Test-Simple test
+cpan/Test-Simple/t/lib/MyOverload.pm Test-Simple test
+cpan/Test-Simple/t/lib/MyTest.pm Test-Simple test
+cpan/Test-Simple/t/lib/NoExporter.pm Test-Simple test
+cpan/Test-Simple/t/lib/SigDie.pm Test-Simple test
+cpan/Test-Simple/t/lib/SmallTest.pm Test-Simple test
+cpan/Test-Simple/t/lib/Test/Builder/NoOutput.pm Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/Catch.pm Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/death_in_eval.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/death.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/death_with_handler.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/exit.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/extras.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/five_fail.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/last_minute_death.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/missing_done_testing.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/one_fail.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/one_fail_without_plan.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/pre_plan_death.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/require.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/success.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/too_few_fail.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/too_few.plx Test-Simple test
+cpan/Test-Simple/t/lib/Test/Simple/sample_tests/two_fail.plx Test-Simple test
+cpan/Test-Simple/t/lib/TieOut.pm Test-Simple test
+cpan/Test-Simple/t/missing.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Event_Child.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Event_Diag.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Event_Finish.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Event_Note.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Event_Ok.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Event_Plan.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Event.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Fork.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Formatter.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Formatter_TAP.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Module.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Provider.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Stream.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Tester.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Trace_Frame.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Trace.t Test-Simple test
+cpan/Test-Simple/t/Modern/Builder_Util.t Test-Simple test
+cpan/Test-Simple/t/Modern/encoding_test.t Test-Simple test
+cpan/Test-Simple/t/Modern/More.t Test-Simple test
+cpan/Test-Simple/t/Modern/NotTB15.t Test-Simple test
+cpan/Test-Simple/t/Modern/Simple.t Test-Simple test
+cpan/Test-Simple/t/Modern/Tester2_subtest.t Test-Simple test
+cpan/Test-Simple/t/Modern/Tester2.t Test-Simple test
+cpan/Test-Simple/t/Modern/tracing.t Test-Simple test
+cpan/Test-Simple/t/More.t Test-Simple test
+cpan/Test-Simple/t/new_ok.t Test-Simple test
+cpan/Test-Simple/t/no_plan.t Test-Simple test
+cpan/Test-Simple/t/no_tests.t Test-Simple test
+cpan/Test-Simple/t/note.t Test-Simple test
+cpan/Test-Simple/t/overload.t Test-Simple test
+cpan/Test-Simple/t/overload_threads.t Test-Simple test
+cpan/Test-Simple/t/PerlIO.t Test-Simple test
+cpan/Test-Simple/t/plan_bad.t Test-Simple test
+cpan/Test-Simple/t/plan_is_noplan.t Test-Simple test
+cpan/Test-Simple/t/plan_no_plan.t Test-Simple test
+cpan/Test-Simple/t/plan_shouldnt_import.t Test-Simple test
+cpan/Test-Simple/t/plan_skip_all.t Test-Simple test
+cpan/Test-Simple/t/plan.t Test-Simple test
+cpan/Test-Simple/t/pod.t Test-Simple test
+cpan/Test-Simple/t/require_ok.t Test-Simple test
+cpan/Test-Simple/t/ribasushi_diag.t Test-Simple test
+cpan/Test-Simple/t/ribasushi_threads.t Test-Simple test
+cpan/Test-Simple/t/Simple/load.t Test-Simple test
+cpan/Test-Simple/t/simple.t Test-Simple test
+cpan/Test-Simple/t/skipall.t Test-Simple test
+cpan/Test-Simple/t/skip.t Test-Simple test
+cpan/Test-Simple/t/strays.t Test-Simple test
+cpan/Test-Simple/t/subtest/args.t Test-Simple test
+cpan/Test-Simple/t/subtest/bail_out.t Test-Simple test
+cpan/Test-Simple/t/subtest/basic.t Test-Simple test
+cpan/Test-Simple/t/subtest/die.t Test-Simple test
+cpan/Test-Simple/t/subtest/do.t Test-Simple test
+cpan/Test-Simple/t/subtest/exceptions.t Test-Simple test
+cpan/Test-Simple/t/subtest/for_do_t.test Test-Simple test
+cpan/Test-Simple/t/subtest/fork.t Test-Simple test
+cpan/Test-Simple/t/subtest/implicit_done.t Test-Simple test
+cpan/Test-Simple/t/subtest/line_numbers.t Test-Simple test
+cpan/Test-Simple/t/subtest/plan.t Test-Simple test
+cpan/Test-Simple/t/subtest/predicate.t Test-Simple test
+cpan/Test-Simple/t/subtest/singleton.t Test-Simple test
+cpan/Test-Simple/t/subtest/threads.t Test-Simple test
+cpan/Test-Simple/t/subtest/todo.t Test-Simple test
+cpan/Test-Simple/t/subtest/wstat.t Test-Simple test
+cpan/Test-Simple/t/tbm_doesnt_set_exported_to.t Test-Simple test
+cpan/Test-Simple/t/Tester/tbt_01basic.t Test-Simple test
+cpan/Test-Simple/t/Tester/tbt_02fhrestore.t Test-Simple test
+cpan/Test-Simple/t/Tester/tbt_03die.t Test-Simple test
+cpan/Test-Simple/t/Tester/tbt_04line_num.t Test-Simple test
+cpan/Test-Simple/t/Tester/tbt_05faildiag.t Test-Simple test
+cpan/Test-Simple/t/Tester/tbt_06errormess.t Test-Simple test
+cpan/Test-Simple/t/Tester/tbt_07args.t Test-Simple test
+cpan/Test-Simple/t/Tester/tbt_08subtest.t Test-Simple test
+cpan/Test-Simple/t/Tester/tbt_09do_script.pl Test-Simple test
+cpan/Test-Simple/t/Tester/tbt_09do.t Test-Simple test
+cpan/Test-Simple/t/Tester/tbt_is_bug.t Test-Simple test
+cpan/Test-Simple/t/test_use_ok.t Test-Simple test
+cpan/Test-Simple/t/threads.t Test-Simple test
+cpan/Test-Simple/t/thread_taint.t Test-Simple test
+cpan/Test-Simple/t/todo.t Test-Simple test
+cpan/Test-Simple/t/TTLegacy/auto.t Test-Simple test
+cpan/Test-Simple/t/TTLegacy/capture.t Test-Simple test
+cpan/Test-Simple/t/TTLegacy/check_tests.t Test-Simple test
+cpan/Test-Simple/t/TTLegacy/depth.t Test-Simple test
+cpan/Test-Simple/t/TTLegacy/run_test.t Test-Simple test
+cpan/Test-Simple/t/undef.t Test-Simple test
+cpan/Test-Simple/t/useing.t Test-Simple test
+cpan/Test-Simple/t/use_ok.t Test-Simple test
+cpan/Test-Simple/t/utf8.t Test-Simple test
+cpan/Test-Simple/t/versions.t Test-Simple test
cpan/Test/t/05_about_verbose.t See if Test works
cpan/Test/t/fail.t See if Test works
cpan/Test/t/mix.t See if Test works
diff --git a/Makefile.SH b/Makefile.SH
index f5e83bab6d..b8e5580b3d 100755
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -1298,8 +1298,8 @@ _cleaner2:
-rmdir lib/Unicode/Collate/Locale lib/Unicode/Collate/CJK
-rmdir lib/Unicode/Collate lib/Tie/Hash lib/Thread lib/Text
-rmdir lib/Test/use lib/Test/Tester lib/Test/Builder/Trace
- -rmdir lib/Test/Builder/Tester lib/Test/Builder/Result
- -rmdir lib/Test/Builder/Formatter lib/Test/Builder lib/Test lib/Term
+ -rmdir lib/Test/Builder/Tester lib/Test/Builder/Formatter
+ -rmdir lib/Test/Builder/Event lib/Test/Builder lib/Test lib/Term
-rmdir lib/TAP/Parser/YAMLish lib/TAP/Parser/SourceHandler
-rmdir lib/TAP/Parser/Scheduler lib/TAP/Parser/Result
-rmdir lib/TAP/Parser/Iterator lib/TAP/Parser lib/TAP/Harness
diff --git a/cpan/Test-Simple/lib/Test/Builder.pm b/cpan/Test-Simple/lib/Test/Builder.pm
index bc88477dbd..bd74daf5b8 100644
--- a/cpan/Test-Simple/lib/Test/Builder.pm
+++ b/cpan/Test-Simple/lib/Test/Builder.pm
@@ -7,16 +7,16 @@ use warnings;
use Test::Builder::Util qw/try protect/;
use Scalar::Util();
use Test::Builder::Stream;
-use Test::Builder::Result;
-use Test::Builder::Result::Ok;
-use Test::Builder::Result::Diag;
-use Test::Builder::Result::Note;
-use Test::Builder::Result::Plan;
-use Test::Builder::Result::Bail;
-use Test::Builder::Result::Child;
+use Test::Builder::Event;
+use Test::Builder::Event::Ok;
+use Test::Builder::Event::Diag;
+use Test::Builder::Event::Note;
+use Test::Builder::Event::Plan;
+use Test::Builder::Event::Bail;
+use Test::Builder::Event::Child;
use Test::Builder::Trace;
-our $VERSION = '1.301001_034';
+our $VERSION = '1.301001_040';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
# The mostly-singleton, and other package vars.
@@ -134,14 +134,14 @@ sub intercept {
local $self->{stream} = $stream;
- my @results;
+ my @events;
$stream->listen(INTERCEPTOR => sub {
my ($item) = @_;
- push @results => $item;
+ push @events => $item;
});
$code->($stream);
- return \@results;
+ return \@events;
}
#########################
@@ -185,7 +185,7 @@ sub child {
$child->depth($self->depth + 1);
- my $res = Test::Builder::Result::Child->new(
+ my $res = Test::Builder::Event::Child->new(
$self->context,
name => $child->name,
action => 'push',
@@ -275,7 +275,7 @@ sub finalize {
$? = $self->{Child_Error};
my $parent = delete $self->{Parent};
- my $res = Test::Builder::Result::Child->new(
+ my $res = Test::Builder::Event::Child->new(
$self->context,
name => $self->{Name} || undef,
action => 'pop',
@@ -296,15 +296,24 @@ sub finalize {
#####################################
sub trace_test {
+ my $self = shift;
+ return $self->{_trace_cache} if $self->{_trace_cache};
my $out;
protect { $out = Test::Builder::Trace->new };
return $out;
}
sub find_TODO {
- my( $self, $pack, $set, $new_value ) = @_;
+ my( $self, $where, $set, $new_value ) = @_;
+
+ my $pack;
+ if ($where && Scalar::Util::blessed($where) && $where->isa('Test::Builder::Trace')) {
+ $pack = $where->todo_package || $self->exported_to;
+ }
+ else {
+ $pack = $where || $self->trace_test->todo_package || $self->exported_to;
+ }
- $pack ||= $self->trace_test->todo_package || $self->exported_to;
return unless $pack;
no strict 'refs'; ## no critic
@@ -395,7 +404,7 @@ sub _issue_plan {
$self->croak("You tried to plan twice");
}
- my $plan = Test::Builder::Result::Plan->new(
+ my $plan = Test::Builder::Event::Plan->new(
$self->context,
directive => $directive || undef,
reason => $reason || undef,
@@ -423,7 +432,7 @@ sub done_testing {
if( $self->{Done_Testing} ) {
my($file, $line) = @{$self->{Done_Testing}}[1,2];
- my $ok = Test::Builder::Result::Ok->new(
+ my $ok = Test::Builder::Event::Ok->new(
$self->context,
real_bool => 0,
name => "done_testing() was already called at $file line $line",
@@ -440,7 +449,7 @@ sub done_testing {
$self->{Done_Testing} = [caller];
if ($expected && defined($num_tests) && $num_tests != $expected) {
- my $ok = Test::Builder::Result::Ok->new(
+ my $ok = Test::Builder::Event::Ok->new(
$self->context,
real_bool => 0,
name => "planned to run $expected but done_testing() expects $num_tests",
@@ -469,7 +478,7 @@ sub done_testing {
################
#############################
-# {{{ Base Result Producers #
+# {{{ Base Event Producers #
#############################
sub _ok_obj {
@@ -497,7 +506,7 @@ sub _ok_obj {
$self->_unoverload_str( \$todo );
- my $ok = Test::Builder::Result::Ok->new(
+ my $ok = Test::Builder::Event::Ok->new(
$self->context,
real_bool => $test,
bool => $self->in_todo ? 1 : $test,
@@ -526,6 +535,7 @@ sub _ok_obj {
sub ok {
my $self = shift;
+ local $self->{_trace_cache} = $self->trace_test unless $self->{_trace_cache};
my( $test, $name, @diag ) = @_;
my $ok = $self->_ok_obj($test, $name, @diag);
@@ -557,7 +567,7 @@ sub BAIL_OUT {
die bless {} => 'Test::Builder::Exception';
}
- my $bail = Test::Builder::Result::Bail->new(
+ my $bail = Test::Builder::Event::Bail->new(
$self->context,
reason => $reason,
in_todo => $self->in_todo || 0,
@@ -570,7 +580,7 @@ sub skip {
$why ||= '';
$self->_unoverload_str( \$why );
- my $ok = Test::Builder::Result::Ok->new(
+ my $ok = Test::Builder::Event::Ok->new(
$self->context,
real_bool => 1,
bool => 1,
@@ -585,7 +595,7 @@ sub todo_skip {
my( $self, $why ) = @_;
$why ||= '';
- my $ok = Test::Builder::Result::Ok->new(
+ my $ok = Test::Builder::Event::Ok->new(
$self->context,
real_bool => 0,
bool => 1,
@@ -602,7 +612,7 @@ sub diag {
my $msg = join '', map { defined($_) ? $_ : 'undef' } @_;
- my $r = Test::Builder::Result::Diag->new(
+ my $r = Test::Builder::Event::Diag->new(
$self->context,
in_todo => $self->in_todo || 0,
message => $msg,
@@ -615,7 +625,7 @@ sub note {
my $msg = join '', map { defined($_) ? $_ : 'undef' } @_;
- my $r = Test::Builder::Result::Note->new(
+ my $r = Test::Builder::Event::Note->new(
$self->context,
in_todo => $self->in_todo || 0,
message => $msg,
@@ -624,11 +634,11 @@ sub note {
}
#############################
-# }}} Base Result Producers #
+# }}} Base Event Producers #
#############################
#################################
-# {{{ Advanced Result Producers #
+# {{{ Advanced Event Producers #
#################################
my %numeric_cmps = map { ( $_, 1 ) } ( "<", "<=", ">", ">=", "==", "!=", "<=>" );
@@ -647,18 +657,26 @@ sub cmp_ok {
my $error;
my @diag;
- my($pack, $file, $line) = $self->trace_test->report->call;
+ local $self->{_trace_cache} = $self->trace_test unless $self->{_trace_cache};
+ my @warnings;
(undef, $error) = try {
+ local $SIG{__WARN__} = sub { push @warnings => @_ };
# This is so that warnings come out at the caller's level
## no critic (BuiltinFunctions::ProhibitStringyEval)
eval qq[
-#line $line "(eval in cmp_ok) $file"
+#line 999 "__REPLACE__ME__"
\$test = \$got $type \$expect;
1;
] || die $@;
};
+ for my $warn (@warnings) {
+ my ($pkg, $file, $line) = $self->trace_test->report->call;
+ $warn =~ s/at __REPLACE__ME__ line 999/at (eval in cmp_ok) $file line $line/g;
+ warn $warn;
+ }
+
# Treat overloaded objects as numbers if we're asked to do a
# numeric comparison.
my $unoverload
@@ -771,7 +789,7 @@ sub unlike {
#################################
-# }}} Advanced Result Producers #
+# }}} Advanced Event Producers #
#################################
#######################
@@ -1101,14 +1119,21 @@ sub _regex_ok {
}
my $test;
- my $context = $self->_caller_context;
+ my $context = '#line 999 "__REPLACE__ME__"' . "\n";
+ my @warnings;
try {
+ local $SIG{__WARN__} = sub { push @warnings => @_ };
# No point in issuing an uninit warning, they'll see it in the diagnostics
no warnings 'uninitialized';
## no critic (BuiltinFunctions::ProhibitStringyEval)
$test = eval $context . q{$test = $thing =~ /$usable_regex/ ? 1 : 0};
};
+ for my $warn (@warnings) {
+ my ($pkg, $file, $line) = $self->trace_test->report->call;
+ $warn =~ s/at __REPLACE__ME__ line 999/at $file line $line/g;
+ warn $warn;
+ }
$test = !$test if $cmp eq '!~';
@@ -1478,12 +1503,12 @@ work together>.
=head1 TEST COMPONENT MAP
- [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Result Formatter]
+ [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Event Formatter]
^
You are here
A test script uses a test tool such as L<Test::More>, which uses Test::Builder
-to produce results. The results are sent to L<Test::Builder::Stream> which then
+to produce events. The events are sent to L<Test::Builder::Stream> which then
forwards them on to one or more formatters. The default formatter is
L<Test::Builder::Fromatter::TAP> which produces TAP output.
@@ -1499,7 +1524,7 @@ Create a completely independant Test::Builder object.
my $Test = Test::Builder->create;
-Create a Test::Builder object that sends results to the shared output stream
+Create a Test::Builder object that sends events to the shared output stream
(usually what you want).
my $Test = Test::Builder->create(shared_stream => 1);
@@ -1648,19 +1673,19 @@ B<Note:> Do not set this to the shared stream yourself, set it to undef. This
is because the shared stream is actually a stack, and this always returns the
top of the stack.
-=item $results = $Test->intercept(\&code)
+=item $events = $Test->intercept(\&code)
Any tests run inside the codeblock will be intercepted and not sent to the
-normal stream. Instead they will be added to C<$results> which is an array of
-L<Test::Builder::Result> objects.
+normal stream. Instead they will be added to C<$events> which is an array of
+L<Test::Builder::Event> objects.
B<Note:> This will also intercept BAIL_OUT and skipall.
-B<Note:> This will only intercept results generated with the Test::Builder
+B<Note:> This will only intercept events generated with the Test::Builder
object on which C<intercept()> was called. Other builders will still send to
the normal places.
-See L<Test::Tester2> for a method of capturing results sent to the global
+See L<Test::Tester2> for a method of capturing events sent to the global
stream.
=back
@@ -1740,12 +1765,12 @@ Declares that you are done testing, no more tests will be run after this point.
If a plan has not yet been output, it will do so.
$num_tests is the number of tests you planned to run. If a numbered
-plan was already declared, and if this contradicts, a failing result
+plan was already declared, and if this contradicts, a failing event
will be run to reflect the planning mistake. If C<no_plan> was declared,
this will override.
If C<done_testing()> is called twice, the second call will issue a
-failing result.
+failing event.
If C<$num_tests> is omitted, the number of tests run will be used, like
no_plan.
@@ -1765,10 +1790,10 @@ Or to plan a variable number of tests:
=back
-=head2 SIMPLE RESULT PRODUCERS
+=head2 SIMPLE EVENT PRODUCERS
-Each of these produces 1 or more L<Test::Builder::Result> objects which are fed
-into the result stream.
+Each of these produces 1 or more L<Test::Builder::Event> objects which are fed
+into the event stream.
=over 4
@@ -1782,7 +1807,7 @@ Your basic test. Pass if C<$test> is true, fail if $test is false. Just
like L<Test::Simple>'s C<ok()>.
You may also specify diagnostics messages in the form of simple strings, or
-complete <Test::Builder::Result> objects. Typically you would only do this in a
+complete <Test::Builder::Event> objects. Typically you would only do this in a
failure, but you are allowed to add diags to passes as well.
=item $Test->BAIL_OUT($reason);
@@ -1834,7 +1859,7 @@ normally be seen by the user except in verbose mode.
=back
-=head2 ADVANCED RESULT PRODUCERS
+=head2 ADVANCED EVENT PRODUCERS
=over 4
@@ -2041,7 +2066,7 @@ Of course, test #1 is $tests[0], etc...
=item $self->details
-B<Deprecated:> Moved to the L<Test::Builder::Formatter::LegacyResults> object.
+B<Deprecated:> Moved to the L<Test::Builder::Formatter::LegacyEvents> object.
The style of result recording used here is deprecated. The functionality was
moved to its own object to contain the legacy code.
diff --git a/cpan/Test-Simple/lib/Test/Builder/Result.pm b/cpan/Test-Simple/lib/Test/Builder/Event.pm
index 308a82f901..e48723d8bf 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Result.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Event.pm
@@ -1,4 +1,4 @@
-package Test::Builder::Result;
+package Test::Builder::Event;
use strict;
use warnings;
@@ -24,7 +24,7 @@ sub type {
return lc($1);
}
- confess "Could not determine result type for $self";
+ confess "Could not determine event type for $self";
}
sub indent {
@@ -45,11 +45,11 @@ __END__
=head1 NAME
-Test::Builder::Result - Base class for results
+Test::Builder::Event - Base class for events
=head1 DESCRIPTION
-Base class for all result objects that get passed through
+Base class for all event objects that get passed through
L<Test::Builder::Stream>.
=head1 METHODS
@@ -74,24 +74,24 @@ Get the test trace info, including where to report errors.
=item $r->pid
-PID in which the result was created.
+PID in which the event was created.
=item $r->depth
-Builder depth of the result (0 for normal, 1 for subtest, 2 for nested, etc).
+Builder depth of the event (0 for normal, 1 for subtest, 2 for nested, etc).
=item $r->in_todo
-True if the result was generated inside a todo.
+True if the event was generated inside a todo.
=item $r->source
-Builder that created the result, usually $0, but the name of a subtest when
+Builder that created the event, usually $0, but the name of a subtest when
inside a subtest.
=item $r->constructed
-Package, File, and Line in which the result was built.
+Package, File, and Line in which the event was built.
=back
@@ -101,12 +101,12 @@ Package, File, and Line in which the result was built.
=item $r->type
-Type of result. Usually this is the lowercased name from the end of the
-package. L<Test::Builder::Result::Ok> = 'ok'.
+Type of event. Usually this is the lowercased name from the end of the
+package. L<Test::Builder::Event::Ok> = 'ok'.
=item $r->indent
-Returns the indentation that should be used to display the result (' ' x
+Returns the indentation that should be used to display the event (' ' x
depth).
=back
diff --git a/cpan/Test-Simple/lib/Test/Builder/Result/Bail.pm b/cpan/Test-Simple/lib/Test/Builder/Event/Bail.pm
index ff34db7fdd..d23dc3753d 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Result/Bail.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Event/Bail.pm
@@ -1,8 +1,8 @@
-package Test::Builder::Result::Bail;
+package Test::Builder::Event::Bail;
use strict;
use warnings;
-use base 'Test::Builder::Result';
+use base 'Test::Builder::Event';
use Test::Builder::Util qw/accessors/;
accessors qw/reason/;
@@ -18,7 +18,7 @@ __END__
=head1 NAME
-Test::Builder::Result::Bail - Bailout!
+Test::Builder::Event::Bail - Bailout!
=head1 DESCRIPTION
@@ -26,7 +26,7 @@ Sent when the test needs to bail out.
=head1 METHODS
-See L<Test::Builder::Result> which is the base class for this module.
+See L<Test::Builder::Event> which is the base class for this module.
=head2 CONSTRUCTORS
@@ -52,24 +52,24 @@ Get the test trace info, including where to report errors.
=item $r->pid
-PID in which the result was created.
+PID in which the event was created.
=item $r->depth
-Builder depth of the result (0 for normal, 1 for subtest, 2 for nested, etc).
+Builder depth of the event (0 for normal, 1 for subtest, 2 for nested, etc).
=item $r->in_todo
-True if the result was generated inside a todo.
+True if the event was generated inside a todo.
=item $r->source
-Builder that created the result, usually $0, but the name of a subtest when
+Builder that created the event, usually $0, but the name of a subtest when
inside a subtest.
=item $r->constructed
-Package, File, and Line in which the result was built.
+Package, File, and Line in which the event was built.
=back
@@ -83,12 +83,12 @@ Returns the TAP string for the plan (not indented).
=item $r->type
-Type of result. Usually this is the lowercased name from the end of the
-package. L<Test::Builder::Result::Ok> = 'ok'.
+Type of event. Usually this is the lowercased name from the end of the
+package. L<Test::Builder::Event::Ok> = 'ok'.
=item $r->indent
-Returns the indentation that should be used to display the result (' ' x
+Returns the indentation that should be used to display the event (' ' x
depth).
=back
diff --git a/cpan/Test-Simple/lib/Test/Builder/Result/Child.pm b/cpan/Test-Simple/lib/Test/Builder/Event/Child.pm
index c5fd881aec..dd802a1308 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Result/Child.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Event/Child.pm
@@ -1,8 +1,8 @@
-package Test::Builder::Result::Child;
+package Test::Builder::Event::Child;
use strict;
use warnings;
-use base 'Test::Builder::Result';
+use base 'Test::Builder::Event';
use Carp qw/confess/;
@@ -33,7 +33,7 @@ __END__
=head1 NAME
-Test::Builder::Result::Child - Child result type
+Test::Builder::Event::Child - Child event type
=head1 DESCRIPTION
@@ -41,7 +41,7 @@ Sent when a child Builder is spawned, such as a subtest.
=head1 METHODS
-See L<Test::Builder::Result> which is the base class for this module.
+See L<Test::Builder::Event> which is the base class for this module.
=head2 CONSTRUCTORS
@@ -82,24 +82,24 @@ Get the test trace info, including where to report errors.
=item $r->pid
-PID in which the result was created.
+PID in which the event was created.
=item $r->depth
-Builder depth of the result (0 for normal, 1 for subtest, 2 for nested, etc).
+Builder depth of the event (0 for normal, 1 for subtest, 2 for nested, etc).
=item $r->in_todo
-True if the result was generated inside a todo.
+True if the event was generated inside a todo.
=item $r->source
-Builder that created the result, usually $0, but the name of a subtest when
+Builder that created the event, usually $0, but the name of a subtest when
inside a subtest.
=item $r->constructed
-Package, File, and Line in which the result was built.
+Package, File, and Line in which the event was built.
=back
@@ -113,12 +113,12 @@ no-op, return nothing.
=item $r->type
-Type of result. Usually this is the lowercased name from the end of the
-package. L<Test::Builder::Result::Ok> = 'ok'.
+Type of event. Usually this is the lowercased name from the end of the
+package. L<Test::Builder::Event::Ok> = 'ok'.
=item $r->indent
-Returns the indentation that should be used to display the result (' ' x
+Returns the indentation that should be used to display the event (' ' x
depth).
=back
diff --git a/cpan/Test-Simple/lib/Test/Builder/Result/Diag.pm b/cpan/Test-Simple/lib/Test/Builder/Event/Diag.pm
index f865332dc2..7c1e9b6721 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Result/Diag.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Event/Diag.pm
@@ -1,8 +1,8 @@
-package Test::Builder::Result::Diag;
+package Test::Builder::Event::Diag;
use strict;
use warnings;
-use base 'Test::Builder::Result';
+use base 'Test::Builder::Event';
use Scalar::Util();
use Test::Builder::Util qw/accessors try/;
@@ -51,15 +51,15 @@ __END__
=head1 NAME
-Test::Builder::Result::Diag - Diag result type
+Test::Builder::Event::Diag - Diag event type
=head1 DESCRIPTION
-The diag result type.
+The diag event type.
=head1 METHODS
-See L<Test::Builder::Result> which is the base class for this module.
+See L<Test::Builder::Event> which is the base class for this module.
=head2 CONSTRUCTORS
@@ -85,28 +85,28 @@ Get the test trace info, including where to report errors.
=item $r->pid
-PID in which the result was created.
+PID in which the event was created.
=item $r->depth
-Builder depth of the result (0 for normal, 1 for subtest, 2 for nested, etc).
+Builder depth of the event (0 for normal, 1 for subtest, 2 for nested, etc).
=item $r->in_todo
-True if the result was generated inside a todo.
+True if the event was generated inside a todo.
=item $r->source
-Builder that created the result, usually $0, but the name of a subtest when
+Builder that created the event, usually $0, but the name of a subtest when
inside a subtest.
=item $r->constructed
-Package, File, and Line in which the result was built.
+Package, File, and Line in which the event was built.
=item $r->linked
-If this diag is linked to a specific L<Test::Builder::Result::Ok> object, this
+If this diag is linked to a specific L<Test::Builder::Event::Ok> object, this
will be set to the object. Note this is automatically turned into a weak
reference as it is assumed that the Ok will also link to this object. This is
to avoid cycled and memory leaks.
@@ -123,12 +123,12 @@ Returns the TAP string for the plan (not indented).
=item $r->type
-Type of result. Usually this is the lowercased name from the end of the
-package. L<Test::Builder::Result::Ok> = 'ok'.
+Type of event. Usually this is the lowercased name from the end of the
+package. L<Test::Builder::Event::Ok> = 'ok'.
=item $r->indent
-Returns the indentation that should be used to display the result (' ' x
+Returns the indentation that should be used to display the event (' ' x
depth).
=back
diff --git a/cpan/Test-Simple/lib/Test/Builder/Result/Finish.pm b/cpan/Test-Simple/lib/Test/Builder/Event/Finish.pm
index 9dd7532931..8c02238689 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Result/Finish.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Event/Finish.pm
@@ -1,8 +1,8 @@
-package Test::Builder::Result::Finish;
+package Test::Builder::Event::Finish;
use strict;
use warnings;
-use base 'Test::Builder::Result';
+use base 'Test::Builder::Event';
use Test::Builder::Util qw/accessors/;
accessors qw/tests_run tests_failed/;
@@ -13,7 +13,7 @@ __END__
=head1 NAME
-Test::Builder::Result::Finish - The finish result type
+Test::Builder::Event::Finish - The finish event type
=head1 DESCRIPTION
@@ -21,7 +21,7 @@ Sent after testing is finished.
=head1 METHODS
-See L<Test::Builder::Result> which is the base class for this module.
+See L<Test::Builder::Event> which is the base class for this module.
=head2 CONSTRUCTORS
@@ -51,24 +51,24 @@ Get the test trace info, including where to report errors.
=item $r->pid
-PID in which the result was created.
+PID in which the event was created.
=item $r->depth
-Builder depth of the result (0 for normal, 1 for subtest, 2 for nested, etc).
+Builder depth of the event (0 for normal, 1 for subtest, 2 for nested, etc).
=item $r->in_todo
-True if the result was generated inside a todo.
+True if the event was generated inside a todo.
=item $r->source
-Builder that created the result, usually $0, but the name of a subtest when
+Builder that created the event, usually $0, but the name of a subtest when
inside a subtest.
=item $r->constructed
-Package, File, and Line in which the result was built.
+Package, File, and Line in which the event was built.
=back
@@ -78,12 +78,12 @@ Package, File, and Line in which the result was built.
=item $r->type
-Type of result. Usually this is the lowercased name from the end of the
-package. L<Test::Builder::Result::Ok> = 'ok'.
+Type of event. Usually this is the lowercased name from the end of the
+package. L<Test::Builder::Event::Ok> = 'ok'.
=item $r->indent
-Returns the indentation that should be used to display the result (' ' x
+Returns the indentation that should be used to display the event (' ' x
depth).
=back
diff --git a/cpan/Test-Simple/lib/Test/Builder/Result/Note.pm b/cpan/Test-Simple/lib/Test/Builder/Event/Note.pm
index ff6dd8e1a1..3af5129868 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Result/Note.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Event/Note.pm
@@ -1,8 +1,8 @@
-package Test::Builder::Result::Note;
+package Test::Builder::Event::Note;
use strict;
use warnings;
-use base 'Test::Builder::Result';
+use base 'Test::Builder::Event';
use Test::Builder::Util qw/accessors/;
accessors qw/message/;
@@ -22,7 +22,7 @@ __END__
=head1 NAME
-Test::Builder::Result::Note - Note result type
+Test::Builder::Event::Note - Note event type
=head1 DESCRIPTION
@@ -30,7 +30,7 @@ Notes in tests
=head1 METHODS
-See L<Test::Builder::Result> which is the base class for this module.
+See L<Test::Builder::Event> which is the base class for this module.
=head2 CONSTRUCTORS
@@ -56,24 +56,24 @@ Get the test trace info, including where to report errors.
=item $r->pid
-PID in which the result was created.
+PID in which the event was created.
=item $r->depth
-Builder depth of the result (0 for normal, 1 for subtest, 2 for nested, etc).
+Builder depth of the event (0 for normal, 1 for subtest, 2 for nested, etc).
=item $r->in_todo
-True if the result was generated inside a todo.
+True if the event was generated inside a todo.
=item $r->source
-Builder that created the result, usually $0, but the name of a subtest when
+Builder that created the event, usually $0, but the name of a subtest when
inside a subtest.
=item $r->constructed
-Package, File, and Line in which the result was built.
+Package, File, and Line in which the event was built.
=back
@@ -87,12 +87,12 @@ Returns the TAP string for the plan (not indented).
=item $r->type
-Type of result. Usually this is the lowercased name from the end of the
-package. L<Test::Builder::Result::Ok> = 'ok'.
+Type of event. Usually this is the lowercased name from the end of the
+package. L<Test::Builder::Event::Ok> = 'ok'.
=item $r->indent
-Returns the indentation that should be used to display the result (' ' x
+Returns the indentation that should be used to display the event (' ' x
depth).
=back
diff --git a/cpan/Test-Simple/lib/Test/Builder/Result/Ok.pm b/cpan/Test-Simple/lib/Test/Builder/Event/Ok.pm
index ac22149aec..075fc003d7 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Result/Ok.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Event/Ok.pm
@@ -1,8 +1,8 @@
-package Test::Builder::Result::Ok;
+package Test::Builder::Event::Ok;
use strict;
use warnings;
-use base 'Test::Builder::Result';
+use base 'Test::Builder::Event';
use Carp qw/confess/;
use Scalar::Util qw/blessed reftype/;
@@ -110,14 +110,14 @@ sub diag {
my $array = $type eq 'ARRAY' ? $i : [$i];
for my $d (@$array) {
if (ref $d) {
- confess "Only Diag objects can be linked to results."
- unless blessed($d) && $d->isa('Test::Builder::Result::Diag');
+ confess "Only Diag objects can be linked to events."
+ unless blessed($d) && $d->isa('Test::Builder::Event::Diag');
- confess "Diag argument '$d' is already linked to a result."
+ confess "Diag argument '$d' is already linked to a event."
if $d->linked;
}
else {
- $d = Test::Builder::Result::Diag->new( message => $d );
+ $d = Test::Builder::Event::Diag->new( message => $d );
}
for (qw/trace pid depth in_todo source/) {
@@ -138,15 +138,15 @@ __END__
=head1 NAME
-Test::Builder::Result::Ok - Ok result type
+Test::Builder::Event::Ok - Ok event type
=head1 DESCRIPTION
-The ok result type.
+The ok event type.
=head1 METHODS
-See L<Test::Builder::Result> which is the base class for this module.
+See L<Test::Builder::Event> which is the base class for this module.
=head2 CONSTRUCTORS
@@ -188,35 +188,35 @@ Get the test trace info, including where to report errors.
=item $r->pid
-PID in which the result was created.
+PID in which the event was created.
=item $r->depth
-Builder depth of the result (0 for normal, 1 for subtest, 2 for nested, etc).
+Builder depth of the event (0 for normal, 1 for subtest, 2 for nested, etc).
=item $r->in_todo
-True if the result was generated inside a todo.
+True if the event was generated inside a todo.
=item $r->source
-Builder that created the result, usually $0, but the name of a subtest when
+Builder that created the event, usually $0, but the name of a subtest when
inside a subtest.
=item $r->constructed
-Package, File, and Line in which the result was built.
+Package, File, and Line in which the event was built.
=item $r->diag
-Either undef, or an arrayref of L<Test::Builder::Result::Diag> objects. These
-objects will be linked to this Ok result. Calling C<< $diag->linked >> on them
+Either undef, or an arrayref of L<Test::Builder::Event::Diag> objects. These
+objects will be linked to this Ok event. Calling C<< $diag->linked >> on them
will return this Ok object. References here are strong references, references
to this object from the linked Diag objects are weakened to avoid cycles.
You can push diag objects into the arrayref by using them as arguments to this
method. Objects will be validated to ensure that they are Diag objects, and not
-already linked to a result. As well C<linked> will be set on them.
+already linked to a event. As well C<linked> will be set on them.
=item $r->clear_diag
@@ -235,12 +235,12 @@ Returns the TAP string for the plan (not indented).
=item $r->type
-Type of result. Usually this is the lowercased name from the end of the
-package. L<Test::Builder::Result::Ok> = 'ok'.
+Type of event. Usually this is the lowercased name from the end of the
+package. L<Test::Builder::Event::Ok> = 'ok'.
=item $r->indent
-Returns the indentation that should be used to display the result (' ' x
+Returns the indentation that should be used to display the event (' ' x
depth).
=back
diff --git a/cpan/Test-Simple/lib/Test/Builder/Result/Plan.pm b/cpan/Test-Simple/lib/Test/Builder/Event/Plan.pm
index 63f0acd1af..521aa6b2ba 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Result/Plan.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Event/Plan.pm
@@ -1,8 +1,8 @@
-package Test::Builder::Result::Plan;
+package Test::Builder::Event::Plan;
use strict;
use warnings;
-use base 'Test::Builder::Result';
+use base 'Test::Builder::Event';
use Test::Builder::Util qw/accessors/;
accessors qw/max directive reason/;
@@ -29,15 +29,15 @@ __END__
=head1 NAME
-Test::Builder::Result::Plan - The result of a plan
+Test::Builder::Event::Plan - The event of a plan
=head1 DESCRIPTION
-The plan result object.
+The plan event object.
=head1 METHODS
-See L<Test::Builder::Result> which is the base class for this module.
+See L<Test::Builder::Event> which is the base class for this module.
=head2 CONSTRUCTORS
@@ -71,24 +71,24 @@ Get the test trace info, including where to report errors.
=item $r->pid
-PID in which the result was created.
+PID in which the event was created.
=item $r->depth
-Builder depth of the result (0 for normal, 1 for subtest, 2 for nested, etc).
+Builder depth of the event (0 for normal, 1 for subtest, 2 for nested, etc).
=item $r->in_todo
-True if the result was generated inside a todo.
+True if the event was generated inside a todo.
=item $r->source
-Builder that created the result, usually $0, but the name of a subtest when
+Builder that created the event, usually $0, but the name of a subtest when
inside a subtest.
=item $r->constructed
-Package, File, and Line in which the result was built.
+Package, File, and Line in which the event was built.
=back
@@ -102,12 +102,12 @@ Returns the TAP string for the plan (not indented).
=item $r->type
-Type of result. Usually this is the lowercased name from the end of the
-package. L<Test::Builder::Result::Ok> = 'ok'.
+Type of event. Usually this is the lowercased name from the end of the
+package. L<Test::Builder::Event::Ok> = 'ok'.
=item $r->indent
-Returns the indentation that should be used to display the result (' ' x
+Returns the indentation that should be used to display the event (' ' x
depth).
=back
diff --git a/cpan/Test-Simple/lib/Test/Builder/ExitMagic.pm b/cpan/Test-Simple/lib/Test/Builder/ExitMagic.pm
index 021cad9649..9feb117715 100644
--- a/cpan/Test-Simple/lib/Test/Builder/ExitMagic.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/ExitMagic.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
use Test::Builder::Util qw/new accessors/;
-require Test::Builder::Result::Finish;
+require Test::Builder::Event::Finish;
accessors qw/stream tb ended pid/;
@@ -34,7 +34,7 @@ sub do_magic {
my $fails = $stream->tests_failed;
$stream->send(
- Test::Builder::Result::Finish->new(
+ Test::Builder::Event::Finish->new(
tests_run => $total,
tests_failed => $fails,
depth => $tb->depth,
diff --git a/cpan/Test-Simple/lib/Test/Builder/Fork.pm b/cpan/Test-Simple/lib/Test/Builder/Fork.pm
index c99253a1f9..791270a26b 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Fork.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Fork.pm
@@ -25,10 +25,10 @@ sub handle {
my $self = shift;
my ($item) = @_;
- return if $item && blessed($item) && $item->isa('Test::Builder::Result::Finish');
+ return if $item && blessed($item) && $item->isa('Test::Builder::Event::Finish');
- confess "Did not get a valid Test::Builder::Result object! ($item)"
- unless $item && blessed($item) && $item->isa('Test::Builder::Result');
+ confess "Did not get a valid Test::Builder::Event object! ($item)"
+ unless $item && blessed($item) && $item->isa('Test::Builder::Event');
my $stream = Test::Builder::Stream->shared;
return 0 if $$ == $stream->pid;
@@ -53,7 +53,7 @@ sub cull {
require Storable;
my $obj = Storable::retrieve("$dir/$file");
- die "Empty result object found" unless $obj;
+ die "Empty event object found" unless $obj;
Test::Builder::Stream->shared->send($obj);
@@ -82,7 +82,7 @@ sub DESTROY {
opendir(my $dh, $dir) || die "Could not open temp dir!";
while(my $file = readdir($dh)) {
next if $file =~ m/^\.+$/;
- die "Unculled result! You ran tests in a child process, but never pulled them in!\n"
+ die "Unculled event! You ran tests in a child process, but never pulled them in!\n"
if $file !~ m/\.complete$/;
unlink("$dir/$file") || die "Could not unlink file: $file";
}
@@ -113,7 +113,7 @@ This module is used by L<Test::Builder::Stream> to support forking.
$f->cull;
}
else {
- $f->handle(Test::Builder::Result::Ok->new(bool => 1);
+ $f->handle(Test::Builder::Event::Ok->new(bool => 1);
}
...
@@ -132,15 +132,15 @@ Original PID in which the fork object was created.
=item $f->tmpdir
-Temp dir used to share results between procs
+Temp dir used to share events between procs
-=item $f->handle($result)
+=item $f->handle($event)
-Send a result object to the parent
+Send a event object to the parent
=item $f->cull
-Retrieve result objects and send them to the stream
+Retrieve event objects and send them to the stream
=back
diff --git a/cpan/Test-Simple/lib/Test/Builder/Formatter.pm b/cpan/Test-Simple/lib/Test/Builder/Formatter.pm
index 44e6be4cc4..98465a4beb 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Formatter.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Formatter.pm
@@ -11,8 +11,8 @@ sub handle {
my $self = shift;
my ($item) = @_;
- confess "Handler did not get a valid Test::Builder::Result object! ($item)"
- unless $item && blessed($item) && $item->isa('Test::Builder::Result');
+ confess "Handler did not get a valid Test::Builder::Event object! ($item)"
+ unless $item && blessed($item) && $item->isa('Test::Builder::Event');
my $method = $item->type;
@@ -55,18 +55,18 @@ Test::Builder::Formatter - Base class for formatters
=head1 DESCRIPTION
-Results go to L<Test::Builder::Stream> which then forwards them on to one or
+Events go to L<Test::Builder::Stream> which then forwards them on to one or
more formatters. This module is a base class for formatters. You do not NEED to
use this module to write a formatter, but it can help.
=head1 TEST COMPONENT MAP
- [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Result Formatter]
+ [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Event Formatter]
^
You are here
A test script uses a test tool such as L<Test::More>, which uses Test::Builder
-to produce results. The results are sent to L<Test::Builder::Stream> which then
+to produce events. The events are sent to L<Test::Builder::Stream> which then
forwards them on to one or more formatters. The default formatter is
L<Test::Builder::Fromatter::TAP> which produces TAP output.
@@ -77,7 +77,7 @@ L<Test::Builder::Fromatter::TAP> which produces TAP output.
sub ok {
my $self = shift;
- my ($result) = @_;
+ my ($event) = @_;
...
}
@@ -123,13 +123,13 @@ Construct an instance using %params, and add it as a listener on the stream.
id of the listener, the stream to which the instance will listen, or the
L<Test::Builder> instance from which to find the stream.
-=item $L->handle($result)
+=item $L->handle($event)
-Forward the resutl on to the correct method.
+Forward the event on to the correct method.
=item $subref = $L->to_handler()
-Returns an anonymous sub that accepts results as arguments and passes them into
+Returns an anonymous sub that accepts events as arguments and passes them into
handle() on this instance.
=back
@@ -138,22 +138,22 @@ handle() on this instance.
=over 4
-=item $self->ok($result)
+=item $self->ok($event)
-=item $self->note($result)
+=item $self->note($event)
-=item $self->diag($result)
+=item $self->diag($event)
-=item $self->plan($result)
+=item $self->plan($event)
-=item $self->finish($result)
+=item $self->finish($event)
-=item $self->bail($result)
+=item $self->bail($event)
-=item $self->child($result)
+=item $self->child($event)
-Any results given to the handle() method will be passed into the associated
-sub. If the sub is not defined then results of that type will be ignored.
+Any events given to the handle() method will be passed into the associated
+sub. If the sub is not defined then events of that type will be ignored.
=back
diff --git a/cpan/Test-Simple/lib/Test/Builder/Formatter/LegacyResults.pm b/cpan/Test-Simple/lib/Test/Builder/Formatter/LegacyResults.pm
index 63960f7a27..dee2512f33 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Formatter/LegacyResults.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Formatter/LegacyResults.pm
@@ -134,7 +134,7 @@ deprecated, but needs to still work for legacy code.
=head1 TEST COMPONENT MAP
- [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Result Formatter]
+ [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Event Formatter]
^
You are here
diff --git a/cpan/Test-Simple/lib/Test/Builder/Formatter/TAP.pm b/cpan/Test-Simple/lib/Test/Builder/Formatter/TAP.pm
index f1d2f57d72..1293bdaf2d 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Formatter/TAP.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Formatter/TAP.pm
@@ -41,14 +41,14 @@ sub init {
#######################
#######################
-# {{{ RESULT METHODS
+# {{{ EVENT METHODS
#######################
for my $handler (qw/bail nest/) {
my $sub = sub {
my $self = shift;
my ($item) = @_;
- $self->_print_to_fh($self->result_handle($item, OUT), $item->indent || "", $item->to_tap);
+ $self->_print_to_fh($self->event_handle($item, OUT), $item->indent || "", $item->to_tap);
};
no strict 'refs';
*$handler = $sub;
@@ -61,7 +61,7 @@ sub child {
return unless $item->action eq 'push' && $item->is_subtest;
my $name = $item->name;
- $self->_print_to_fh($self->result_handle($item, OUT), $item->indent || "", "# Subtest: $name\n");
+ $self->_print_to_fh($self->event_handle($item, OUT), $item->indent || "", "# Subtest: $name\n");
}
sub finish {
@@ -80,7 +80,7 @@ sub finish {
}
my $total = $item->tests_run;
- $self->_print_to_fh($self->result_handle($item, OUT), $item->indent || '', "1..$total\n");
+ $self->_print_to_fh($self->event_handle($item, OUT), $item->indent || '', "1..$total\n");
}
sub plan {
@@ -96,7 +96,7 @@ sub plan {
my $out = $item->to_tap;
return unless $out;
- my $handle = $self->result_handle($item, OUT);
+ my $handle = $self->event_handle($item, OUT);
$self->_print_to_fh($handle, $item->indent || "", $out);
}
@@ -104,9 +104,9 @@ sub ok {
my $self = shift;
my ($item) = @_;
- $self->atomic_result(sub {
+ $self->atomic_event(sub {
my $num = $self->use_numbers ? ++($self->{number}) : undef;
- $self->_print_to_fh($self->result_handle($item, OUT), $item->indent || "", $item->to_tap($num));
+ $self->_print_to_fh($self->event_handle($item, OUT), $item->indent || "", $item->to_tap($num));
});
}
@@ -120,7 +120,7 @@ sub diag {
return if $^C;
my $want_handle = $item->in_todo ? TODO : FAIL;
- my $handle = $self->result_handle($item, $want_handle);
+ my $handle = $self->event_handle($item, $want_handle);
$self->_print_to_fh( $handle, $item->indent || "", $item->to_tap );
}
@@ -134,11 +134,11 @@ sub note {
# Prevent printing headers when compiling (i.e. -c)
return if $^C;
- $self->_print_to_fh( $self->result_handle($item, OUT), $item->indent || "", $item->to_tap );
+ $self->_print_to_fh( $self->event_handle($item, OUT), $item->indent || "", $item->to_tap );
}
#######################
-# }}} RESULT METHODS
+# }}} EVENT METHODS
#######################
##############################
@@ -179,11 +179,11 @@ sub encoding_set {
return $self->io_sets->{$encoding};
}
-sub result_handle {
+sub event_handle {
my $self = shift;
- my ($result, $index) = @_;
+ my ($event, $index) = @_;
- my $rencoding = $result ? $result->encoding : undef;
+ my $rencoding = $event ? $event->encoding : undef;
# Open handles in the encoding if one is set.
$self->encoding_set($rencoding) if $rencoding && $rencoding ne 'legacy';
@@ -288,7 +288,7 @@ sub current_test {
if (@_) {
my ($new) = @_;
- $self->atomic_result(sub { $self->{number} = $new });
+ $self->atomic_event(sub { $self->{number} = $new });
}
return $self->{number};
@@ -330,7 +330,7 @@ sub open_handles {
return ($out, $err);
}
-sub atomic_result {
+sub atomic_event {
my $self = shift;
my ($code) = @_;
lock $self->{lock};
@@ -410,18 +410,18 @@ Test::Builder::Formatter::TAP - TAP formatter.
=head1 TEST COMPONENT MAP
- [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Result Formatter]
+ [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Event Formatter]
^
You are here
A test script uses a test tool such as L<Test::More>, which uses Test::Builder
-to produce results. The results are sent to L<Test::Builder::Stream> which then
+to produce events. The events are sent to L<Test::Builder::Stream> which then
forwards them on to one or more formatters. The default formatter is
L<Test::Builder::Fromatter::TAP> which produces TAP output.
=head1 DESCRIPTION
-This module is responsible for taking results from the stream and outputting
+This module is responsible for taking events from the stream and outputting
TAP. You probably should not directly interact with this.
=head1 AUTHORS
diff --git a/cpan/Test-Simple/lib/Test/Builder/Module.pm b/cpan/Test-Simple/lib/Test/Builder/Module.pm
index 1a095ca8fc..47173ff68e 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Module.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Module.pm
@@ -7,7 +7,7 @@ use Test::Builder 0.99;
require Exporter;
our @ISA = qw(Exporter);
-our $VERSION = '1.301001_034';
+our $VERSION = '1.301001_040';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
diff --git a/cpan/Test-Simple/lib/Test/Builder/Provider.pm b/cpan/Test-Simple/lib/Test/Builder/Provider.pm
index fbee3b5722..01d942e6a8 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Provider.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Provider.pm
@@ -227,12 +227,12 @@ Test::Builder::Provider - Helper for writing testing tools
=head1 TEST COMPONENT MAP
- [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Result Formatter]
+ [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Event Formatter]
^
You are here
A test script uses a test tool such as L<Test::More>, which uses Test::Builder
-to produce results. The results are sent to L<Test::Builder::Stream> which then
+to produce events. The events are sent to L<Test::Builder::Stream> which then
forwards them on to one or more formatters. The default formatter is
L<Test::Builder::Fromatter::TAP> which produces TAP output.
@@ -289,7 +289,7 @@ functions to define exports on the fly.
sub subtests_alt(&) { ... }
sub subtests_xxx(&) { ... }
- # Export a helper function that does not produce any results (regular
+ # Export a helper function that does not produce any events (regular
# export).
give echo => sub { print @_ };
@@ -345,7 +345,7 @@ any references to C<$Test::Builder::Level> which is now deprecated.
sub subtests_alt(&) { ... }
sub subtests_xxx(&) { ... }
- # No special marking needed for these as they do not produce results.
+ # No special marking needed for these as they do not produce events.
sub echo { print @_ }
sub echo_stdout { ... }
sub echo_stderr { ... }
@@ -406,7 +406,7 @@ exporting it.
=item provide $name => sub { ... }
-Provide a testing tool that will produce results. If no coderef is given it
+Provide a testing tool that will produce events. If no coderef is given it
will look for a coderef with $name in your package.
You may also use this to export refs of any type.
@@ -421,14 +421,14 @@ Like provide except you can specify multiple subs to export.
=item &nest($code)
-Used as a tracing barrier, any results generated inside the nest will trace to
+Used as a tracing barrier, any events generated inside the nest will trace to
the nest as opposed to the call to your provided tool.
=item give $name
=item give $name => sub { ... }
-Export a helper function that does not produce results.
+Export a helper function that does not produce events.
=item gives qw/sub1 sub2 .../
diff --git a/cpan/Test-Simple/lib/Test/Builder/Stream.pm b/cpan/Test-Simple/lib/Test/Builder/Stream.pm
index d7e07204ca..fdfeb9ef1e 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Stream.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Stream.pm
@@ -81,8 +81,8 @@ sub new {
sub follow_up {
my $self = shift;
my ($type, @action) = @_;
- croak "'$type' is not a result type"
- unless $type && $type->isa('Test::Builder::Result');
+ croak "'$type' is not an event type"
+ unless $type && $type->isa('Test::Builder::Event');
if (@action) {
my ($sub) = @action;
@@ -98,8 +98,8 @@ sub follow_up {
sub legacy_followup {
my $self = shift;
$self->_follow_up({
- 'Test::Builder::Result::Bail' => sub { exit 255 },
- 'Test::Builder::Result::Plan' => sub {
+ 'Test::Builder::Event::Bail' => sub { exit 255 },
+ 'Test::Builder::Event::Plan' => sub {
my ($plan) = @_;
return unless $plan->directive;
return unless $plan->directive eq 'SKIP';
@@ -112,8 +112,8 @@ sub exception_followup {
my $self = shift;
$self->_follow_up({
- 'Test::Builder::Result::Bail' => sub {die $_[0]},
- 'Test::Builder::Result::Plan' => sub {
+ 'Test::Builder::Event::Bail' => sub {die $_[0]},
+ 'Test::Builder::Event::Plan' => sub {
my $plan = shift;
return unless $plan->directive;
return unless $plan->directive eq 'SKIP';
@@ -250,15 +250,15 @@ sub send {
}
for my $item (@$items) {
- if ($item->isa('Test::Builder::Result::Plan')) {
+ if ($item->isa('Test::Builder::Event::Plan')) {
$self->plan($item);
}
- if ($item->isa('Test::Builder::Result::Bail')) {
+ if ($item->isa('Test::Builder::Event::Bail')) {
$self->bailed_out($item);
}
- if ($item->isa('Test::Builder::Result::Ok')) {
+ if ($item->isa('Test::Builder::Event::Ok')) {
$self->tests_run(1);
$self->tests_failed(1) unless $item->bool;
}
@@ -384,20 +384,20 @@ Test::Bulder::Stream - The stream between Test::Builder and the formatters.
=head1 TEST COMPONENT MAP
- [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Result Formatter]
+ [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Event Formatter]
^
You are here
A test script uses a test tool such as L<Test::More>, which uses Test::Builder
-to produce results. The results are sent to L<Test::Builder::Stream> which then
+to produce events. The events are sent to L<Test::Builder::Stream> which then
forwards them on to one or more formatters. The default formatter is
L<Test::Builder::Fromatter::TAP> which produces TAP output.
=head1 DESCRIPTION
-This module is responsible for taking result object from L<Test::Builder> and
+This module is responsible for taking event object from L<Test::Builder> and
forwarding them to the listeners/formatters. It also has facilities for
-intercepting the results and munging them. Examples of this are forking support
+intercepting the events and munging them. Examples of this are forking support
and L<Test::Tester2>.
=head1 METHODS
@@ -517,12 +517,12 @@ Check if tests are passing, optinally you can pass in a $bool to reset this.
enable/disable endings. Defaults to false.
-=item $action = $stream->follow_up('Test::Builder::Result::...')
+=item $action = $stream->follow_up('Test::Builder::Event::...')
-=item $stream->follow_up('Test::Builder::Result::...' => sub { ($r) = @_; ... })
+=item $stream->follow_up('Test::Builder::Event::...' => sub { ($r) = @_; ... })
-Fetch or Specify a followup behavior to run after all listeners have gotten a
-result of the specified type.
+Fetch or Specify a followup behavior to run after all listeners have gotten an
+event of the specified type.
=item $stream->legacy_followup
@@ -531,7 +531,7 @@ switch to legacy follow-up behavior. This means exiting for bailout or skip_all.
=item $stream->exception_followup
Switch to exception follow-up behavior. This means throwing an exception on
-bailout or skip_all. This is necessary for intercepting results.
+bailout or skip_all. This is necessary for intercepting events.
=item $fork_handler = $stream->fork
@@ -570,7 +570,7 @@ Get the listener with the given ID.
=item $unlisten = $stream->listen($id, $listener)
Add a listener with the given ID. The listener can either be a coderef that
-takes a result object as an argument, or any object that implements a handle()
+takes a event object as an argument, or any object that implements a handle()
method.
This method returns a coderef that can be used to remove the listener. It is
@@ -601,7 +601,7 @@ Disable the legacy tap listener.
=back
-=head3 LEGACY RESULTS LISTENER
+=head3 LEGACY EVENTS LISTENER
=over 4
@@ -619,15 +619,15 @@ Disable legacy results
=back
-=head2 MUNGING RESULTS
+=head2 MUNGING EVENTS
-Mungers are expected to take a result object and return 1 or more result
+Mungers are expected to take an event object and return 1 or more event
objects to replace the original. They are also allowed to simply modify the
original, or return nothing to remove it.
Mungers are run in the order they are added, it is possible that the first
-munger will remove a result in which case later mungers will never see it.
-Listeners get the product of running all the mungers on the original results.
+munger will remove an event in which case later mungers will never see it.
+Listeners get the product of running all the mungers on the original event.
=over 4
@@ -637,7 +637,7 @@ Get the munger with the specified ID.
=item $unmunge = $stream->munge($id => $munger)
-Add a munger. The munger may be a coderef that takes a single result object as
+Add a munger. The munger may be a coderef that takes a single event object as
an argument, or it can be any object that implements a handle() method.
This method returns a coderef that can be used to remove the munger. It is
@@ -650,13 +650,13 @@ Remove a munger by id.
=back
-=head2 PROVIDING RESULTS
+=head2 PROVIDING EVENTS
=over 4
-=item $stream->send($result)
+=item $stream->send($event)
-Send a result to all listeners (also goes through munging and the form handler,
+Send a event to all listeners (also goes through munging and the form handler,
etc.)
=back
diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester.pm b/cpan/Test-Simple/lib/Test/Builder/Tester.pm
index 68dac50c87..cde3183685 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Tester.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Tester.pm
@@ -1,7 +1,7 @@
package Test::Builder::Tester;
use strict;
-our $VERSION = '1.301001_034';
+our $VERSION = '1.301001_040';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
use Test::Builder 1.301001;
diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm b/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
index 16f54db54b..fdd1f5ce98 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
@@ -1,7 +1,7 @@
package Test::Builder::Tester::Color;
use strict;
-our $VERSION = '1.301001_034';
+our $VERSION = '1.301001_040';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
require Test::Builder::Tester;
diff --git a/cpan/Test-Simple/lib/Test/Builder/Trace.pm b/cpan/Test-Simple/lib/Test/Builder/Trace.pm
index 09b76c955e..3f19222539 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Trace.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Trace.pm
@@ -5,18 +5,21 @@ use warnings;
use Test::Builder::Util qw/accessor accessors is_tester try/;
use Test::Builder::Trace::Frame;
use List::Util qw/first/;
-
-accessor anointed => sub { [] };
-accessor full => sub { [] };
-accessor level => sub { [] };
-accessor tools => sub { [] };
-accessor transitions => sub { [] };
-accessor stack => sub { [] };
-accessor todo => sub { [] };
-
-accessors qw/_report parent/;
-
-my $LEVEL_WARNED = 0;
+use Scalar::Util qw/blessed/;
+
+accessor _anointed => sub { [] };
+accessor _full => sub { [] };
+accessor _level => sub { [] };
+accessor _tools => sub { [] };
+accessor _transitions => sub { [] };
+accessor _stack => sub { [] };
+accessor _todo => sub { [] };
+accessor raw => sub { [] };
+accessor packages => sub { [] };
+accessor seek_level => sub { 0 };
+accessor todo_raw => sub { {} };
+
+accessors qw/_report encoding _parent/;
sub nest {
my $class = shift;
@@ -24,26 +27,118 @@ sub nest {
$code->(@args);
}
+sub anoint {
+ my $class = shift;
+ my ($target, $oil) = @_;
+
+ unless (is_tester($target)) {
+ my $meta = {anointed_by => {}};
+ no strict 'refs';
+ *{"$target\::TB_TESTER_META"} = sub {$meta};
+ }
+
+ return 1 unless $oil;
+ my $meta = $target->TB_TESTER_META;
+ $meta->{anointed_by}->{$oil} = 1;
+}
+
sub new {
my $class = shift;
my $self = bless {}, $class;
- my $stack_level = 0;
my $seek_level = do { no warnings 'once'; $Test::Builder::Level - $Test::Builder::BLevel };
- my $notb_level = 0;
+ $self->seek_level($seek_level);
+
+ my %todo;
+ my %packages;
+
+ my $raw = $self->raw;
+ my $plist = $self->packages;
+
+ my $stack_level = 0;
+ while(my @call = CORE::caller($stack_level++)) {
+ unless(exists $todo{$call[0]}) {
+ no strict 'refs';
+ $todo{$call[0]} = ${"$call[0]\::TODO"};
+ }
+
+ my $record = [@call[0 .. 4], $todo{$call[0]}];
+ push @$raw => $record;
+
+ next if $packages{$call[0]}++;
+ push @$plist => $call[0];
+ next if $self->encoding;
+ next unless is_tester($call[0]);
+ next if $call[3] eq 'Test::Builder::subtest';
+ $self->encoding($call[0]->TB_TESTER_META->{encoding});
+ }
+
+ $self->todo_raw(\%todo);
+
+ return $self;
+}
+
+accessor todo_reasons => sub {
+ my $self = shift;
+ my %seen;
+ return [grep { $_ && !$seen{$_} } values %{$self->todo_raw}];
+};
+
+accessor todo_package => sub {
+ my $self = shift;
+
+ # Do not force building, but if it is built use it.
+ if ($self->{_build}) {
+ return $self->report->package if $self->report && $self->report->todo;
+ return $self->todo->[-1]->package if @{$self->todo};
+ return $self->anointed->[-1]->package if @{$self->anointed};
+ return;
+ }
+
+ my $raw = $self->todo_raw;
+ if (@{$self->todo_reasons}) {
+ for my $pkg (@{$self->packages}) {
+ next unless $raw->{$pkg};
+ return $pkg;
+ }
+ }
+
+ my $anointed;
+ for my $pkg (@{$self->packages}) {
+ no strict 'refs';
+ no warnings 'once';
+
+ my $ref = *{$pkg . '::TODO'}{SCALAR};
+ return $pkg if $ref == *Test::More::TODO{SCALAR};
+
+ $anointed ||= $pkg if is_tester($pkg);
+ }
+
+ return $anointed;
+};
+
+sub _build {
+ my $self = shift;
+ my $class = blessed($self);
+
+ return if $self->{_build}++;
+
+ my $seek_level = $self->seek_level;
+ my $stack_level = 0;
+ my $notb_level = 0;
my $current = $self;
- while(my @call = CORE::caller($stack_level)) {
+ for my $call (@{$self->raw}) {
my $depth = $stack_level++;
- my $frame = Test::Builder::Trace::Frame->new($depth, @call);
- my ($pkg, $file, $line, $sub) = @call;
+ my $frame = Test::Builder::Trace::Frame->new($depth, @$call);
+ my ($pkg, $file, $line, $sub, $todo) = @$call;
- push @{$current->full} => $frame;
+ push @{$current->_full} => $frame;
if ($frame->nest) {
$current->report;
- $current->parent( bless {}, $class );
- $current = $current->parent;
+ $current->_parent( bless {}, $class );
+ $current = $current->_parent;
next;
}
@@ -53,44 +148,18 @@ sub new {
if ($seek_level && $notb_level - 1 == $seek_level) {
$frame->level(1);
- $current->report($current->tools->[-1]) if $current->tools->[-1] && !($current->_report || $frame->anointed);
-
- warn "\$Test::Builder::Level was used to trace a test! \$Test::Builder::Level is deprecated!\n"
- if $INC{'Test/Tester2.pm'} && !$LEVEL_WARNED++;
+ $current->_report($current->tools->[-1]) if $current->tools->[-1] && !($current->_report || $frame->anointed);
}
next unless grep { $frame->$_ } qw/provider_tool anointed transition level todo/;
- push @{$current->stack} => $frame;
- push @{$current->tools} => $frame if $frame->provider_tool;
- push @{$current->anointed} => $frame if $frame->anointed;
- push @{$current->transitions} => $frame if $frame->transition;
- push @{$current->level} => $frame if $frame->level;
- push @{$current->todo} => $frame if $frame->todo;
+ push @{$current->_stack} => $frame;
+ push @{$current->_tools} => $frame if $frame->provider_tool;
+ push @{$current->_anointed} => $frame if $frame->anointed;
+ push @{$current->_transitions} => $frame if $frame->transition;
+ push @{$current->_level} => $frame if $frame->level;
+ push @{$current->_todo} => $frame if $frame->todo;
}
-
- $current->report;
- $current->encoding; # Generate this now
-
- return $self;
-}
-
-sub encoding {
- my $self = shift;
-
- unless($self->{encoding}) {
- return unless @{$self->anointed};
- $self->{encoding} = $self->anointed->[0]->package->TB_TESTER_META->{encoding};
- }
-
- return $self->{encoding};
-}
-
-sub todo_package {
- my $self = shift;
- return $self->report->package if $self->report && $self->report->todo;
- return $self->todo->[-1]->package if @{$self->todo};
- return $self->anointed->[-1]->package if @{$self->anointed};
}
sub report {
@@ -102,10 +171,11 @@ sub report {
$self->_report($report);
}
elsif (!$self->_report) {
- my $level = $self->level->[0];
- my $tool = $self->tools->[-1];
- my $anointed = first { !$_->provider_tool } @{$self->anointed};
- my $transition = $self->transitions->[-1];
+ $self->_build;
+ my $level = $self->_level->[0];
+ my $tool = $self->_tools->[-1];
+ my $anointed = first { !$_->provider_tool } @{$self->_anointed};
+ my $transition = $self->_transitions->[-1];
if ($tool && $level) {
($report) = sort { $b->{depth} <=> $a->{depth} } $tool, $level;
@@ -138,19 +208,16 @@ sub _is_transition {
return 1;
}
-sub anoint {
- my $class = shift;
- my ($target, $oil) = @_;
+for my $name (qw/anointed full level tools transitions stack todo parent/) {
+ my $acc = "_$name";
+ my $sub = sub {
+ my $self = shift;
+ $self->_build;
+ return $self->$acc;
+ };
- unless (is_tester($target)) {
- my $meta = {anointed_by => {}};
- no strict 'refs';
- *{"$target\::TB_TESTER_META"} = sub {$meta};
- }
-
- return 1 unless $oil;
- my $meta = $target->TB_TESTER_META;
- $meta->{anointed_by}->{$oil} = 1;
+ no strict 'refs';
+ *$name = $sub;
}
1;
@@ -161,7 +228,7 @@ __END__
=head1 NAME
-Test::Builder::Trace - Module to represent a stack trace from a test result.
+Test::Builder::Trace - Module to represent a stack trace from a test event.
=head1 DESCRIPTION
@@ -182,7 +249,7 @@ Create a new object tracing from itself to the deepest stack frame.
=item $class->nest(sub { ... })
-Used as a tracing barrier. Results produced in the coderef will trace to that
+Used as a tracing barrier. Events produced in the coderef will trace to that
coderef and no deeper.
=item $class->anoint($TARGET_PACKAGE)
@@ -203,10 +270,6 @@ Get the L<Test::Builder::Trace::Frame> object that should be used when
reporting errors. The 'report' is determined by examining the stack,
C<$Test::Builder::Level>, and provider/anointed metadata.
-=item $package = $trace->todo_package
-
-Get the name of the package from which the $TODO variable should be checked.
-
=item $trace = $trace->parent
A trace stops when it encounters a call to C<Test::Builder::Trace::nest> which
@@ -275,3 +338,4 @@ This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
See F<http://www.perl.com/perl/misc/Artistic.html>
+
diff --git a/cpan/Test-Simple/lib/Test/Builder/Trace/Frame.pm b/cpan/Test-Simple/lib/Test/Builder/Trace/Frame.pm
index 3290dbd1e5..6d4a1daf37 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Trace/Frame.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Trace/Frame.pm
@@ -7,26 +7,26 @@ use Test::Builder::Util qw/accessors accessor is_provider is_tester/;
my %BUILDER_PACKAGES = (
__PACKAGE__, 1,
'Test::Builder' => 1,
- 'Test::Builder::Result' => 1,
- 'Test::Builder::Result::Bail' => 1,
- 'Test::Builder::Result::Child' => 1,
- 'Test::Builder::Result::Diag' => 1,
- 'Test::Builder::Result::Note' => 1,
- 'Test::Builder::Result::Ok' => 1,
- 'Test::Builder::Result::Plan' => 1,
+ 'Test::Builder::Event' => 1,
+ 'Test::Builder::Event::Bail' => 1,
+ 'Test::Builder::Event::Child' => 1,
+ 'Test::Builder::Event::Diag' => 1,
+ 'Test::Builder::Event::Note' => 1,
+ 'Test::Builder::Event::Ok' => 1,
+ 'Test::Builder::Event::Plan' => 1,
'Test::Builder::Stream' => 1,
'Test::Builder::Trace' => 1,
'Test::Builder::Util' => 1,
);
accessors qw{
- depth package file line subname
+ depth package file line subname todo
level report
};
sub new {
my $class = shift;
- my ($depth, $pkg, $file, $line, $sub) = @_;
+ my ($depth, $pkg, $file, $line, $sub, $todo) = @_;
return bless {
depth => $depth || 0,
@@ -34,6 +34,7 @@ sub new {
file => $file || undef,
line => $line || 0,
subname => $sub || undef,
+ todo => $todo || undef,
}, $class;
}
@@ -47,17 +48,6 @@ sub call {
);
}
-accessor todo => sub {
- my $self = shift;
- no strict 'refs';
- no warnings 'once';
-
- my $ref = *{$self->package . '::TODO'}{SCALAR};
- return 1 if $ref == *Test::More::TODO{SCALAR};
- return 0 unless defined $$ref;
- return 1;
-};
-
accessor transition => sub {
my $self = shift;
@@ -192,10 +182,7 @@ They will be cached for future calls.
=item $todo = $frame->todo
-True if the frame comes from a package where $TODO is present.
-
-B<Caveat> Will not find the $TODO if it is undefined UNLESS the $TODO came from
-L<Test::More>.
+Returns the TODO message if $TODO is set in the package the frame is from.
=item $bool = $frame->nest
@@ -250,3 +237,4 @@ This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
See F<http://www.perl.com/perl/misc/Artistic.html>
+
diff --git a/cpan/Test-Simple/lib/Test/Builder/Util.pm b/cpan/Test-Simple/lib/Test/Builder/Util.pm
index 4b053a47d5..1a11387cc5 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Util.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Util.pm
@@ -136,16 +136,24 @@ sub _accessor {
my ($caller, $attr, $default) = @_;
my $name = lc $attr;
- my $sub = sub {
- my $self = shift;
- croak "$name\() must be called on a blessed instance, got: $self"
- unless blessed $self;
+ my $sub;
+ if ($default) {
+ $sub = sub {
+ my $self = shift;
- $self->{$attr} = $self->$default if $default && !exists $self->{$attr};
- ($self->{$attr}) = @_ if @_;
+ $self->{$attr} = $self->$default unless exists $self->{$attr};
+ ($self->{$attr}) = @_ if @_;
- return $self->{$attr};
- };
+ return $self->{$attr};
+ };
+ }
+ else {
+ $sub = sub {
+ my $self = shift;
+ ($self->{$attr}) = @_ if @_;
+ return $self->{$attr};
+ };
+ }
no strict 'refs';
*{"$caller\::$name"} = $sub;
@@ -285,12 +293,10 @@ sub is_provider {
}
sub find_builder {
- my $trace = Test::Builder->trace_test;
-
- if ($trace && $trace->report) {
- my $pkg = $trace->report->package;
- return $pkg->TB_INSTANCE
- if $pkg && package_sub($pkg, 'TB_INSTANCE');
+ my $level = 1;
+ while (my @call = caller($level++)) {
+ next unless package_sub($call[0], 'TB_INSTANCE');
+ return $call[0]->TB_INSTANCE;
}
return Test::Builder->new;
@@ -441,3 +447,4 @@ This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
See F<http://www.perl.com/perl/misc/Artistic.html>
+
diff --git a/cpan/Test-Simple/lib/Test/More.pm b/cpan/Test-Simple/lib/Test/More.pm
index 8b183c69e8..83f1be0c4c 100644
--- a/cpan/Test-Simple/lib/Test/More.pm
+++ b/cpan/Test-Simple/lib/Test/More.pm
@@ -20,7 +20,7 @@ sub _carp {
return warn @_, " at $file line $line\n";
}
-our $VERSION = '1.301001_034';
+our $VERSION = '1.301001_040';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
our $TODO;
@@ -110,7 +110,7 @@ sub before_import {
elsif ($item eq 'encoding') {
modernize($dest) unless $modern++;
$encoding_set++;
- my $encoding = @{$list->[$idx++]};
+ my $encoding = $list->[$idx++];
_set_tap_encoding($dest, $encoding);
}
else {
@@ -918,12 +918,12 @@ Test::More - yet another framework for writing test scripts
=head1 TEST COMPONENT MAP
- [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Result Formatter]
+ [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Event Formatter]
^
You are here
A test script uses a test tool such as L<Test::More>, which uses Test::Builder
-to produce results. The results are sent to L<Test::Builder::Stream> which then
+to produce events. The events are sent to L<Test::Builder::Stream> which then
forwards them on to one or more formatters. The default formatter is
L<Test::Builder::Fromatter::TAP> which produces TAP output.
@@ -1031,22 +1031,22 @@ This is safer than and replaces the "no_plan" plan.
=item use Test::More 'enable_forking';
-Turn on forking support. This lets you fork and generate results from each
+Turn on forking support. This lets you fork and generate events from each
process. It is your job to call C<cull()> periodically in the original process
-to collect the results from other processes.
+to collect the events from other processes.
use strict;
use warnings;
use Test::More tests => 2, qw/enable_forking/;
- ok(1, "Result in parent" );
+ ok(1, "Event in parent" );
if (my $pid = fork()) {
waitpid($pid, 0);
cull();
}
else {
- ok(1, "Result in child");
+ ok(1, "Event in child");
exit 0;
}
@@ -2002,7 +2002,7 @@ Key feature milestones include:
=over 4
-=item result stream
+=item event stream
=item forking support
@@ -2213,3 +2213,4 @@ This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
See F<http://www.perl.com/perl/misc/Artistic.html>
+
diff --git a/cpan/Test-Simple/lib/Test/Simple.pm b/cpan/Test-Simple/lib/Test/Simple.pm
index 00dd6993d0..9d98ecd286 100644
--- a/cpan/Test-Simple/lib/Test/Simple.pm
+++ b/cpan/Test-Simple/lib/Test/Simple.pm
@@ -4,7 +4,7 @@ use 5.008001;
use strict;
-our $VERSION = '1.301001_034';
+our $VERSION = '1.301001_040';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
use Test::Builder::Provider;
@@ -47,7 +47,7 @@ sub before_import {
$encoding_set++;
}
elsif ($item eq 'encoding') {
- my $encoding = @{$list->[$idx++]};
+ my $encoding = $list->[$idx++];
Test::More::_set_tap_encoding($dest, $encoding);
$encoding_set++;
}
@@ -84,12 +84,12 @@ Test::Simple - Basic utilities for writing tests.
=head1 TEST COMPONENT MAP
- [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Result Formatter]
+ [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Event Formatter]
^
You are here
A test script uses a test tool such as L<Test::More>, which uses Test::Builder
-to produce results. The results are sent to L<Test::Builder::Stream> which then
+to produce events. The events are sent to L<Test::Builder::Stream> which then
forwards them on to one or more formatters. The default formatter is
L<Test::Builder::Fromatter::TAP> which produces TAP output.
diff --git a/cpan/Test-Simple/lib/Test/Tester.pm b/cpan/Test-Simple/lib/Test/Tester.pm
index 40ec53b1d2..5eab16c08c 100644
--- a/cpan/Test-Simple/lib/Test/Tester.pm
+++ b/cpan/Test-Simple/lib/Test/Tester.pm
@@ -21,7 +21,7 @@ require Exporter;
use vars qw( @ISA @EXPORT $VERSION );
-our $VERSION = '1.301001_034';
+our $VERSION = '1.301001_040';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
@EXPORT = qw( run_tests check_tests check_test cmp_results show_space );
@@ -387,7 +387,7 @@ should allow your test scripts to do
and after that any tests inside your module will captured.
-=head1 TEST RESULTS
+=head1 TEST EVENTS
The result of each test is captured in a hash. These hashes are the same as
the hashes returned by Test::Builder->details but with a couple of extra
diff --git a/cpan/Test-Simple/lib/Test/Tester2.pm b/cpan/Test-Simple/lib/Test/Tester2.pm
index fa2a1d6c9c..3a1fe5f036 100644
--- a/cpan/Test-Simple/lib/Test/Tester2.pm
+++ b/cpan/Test-Simple/lib/Test/Tester2.pm
@@ -10,13 +10,13 @@ use Scalar::Util qw/blessed reftype/;
use Carp qw/croak/;
use Test::Builder::Provider;
-gives qw/intercept display_results display_result render_result/;
-provides qw/results_are/;
+gives qw/intercept display_events display_event render_event/;
+provides qw/events_are/;
sub intercept(&) {
my ($code) = @_;
- my @results;
+ my @events;
my ($ok, $error) = try {
Test::Builder::Stream->intercept(
@@ -27,7 +27,7 @@ sub intercept(&) {
$stream->listen(
INTERCEPTOR => sub {
my ($item) = @_;
- push @results => $item;
+ push @events => $item;
}
);
$code->();
@@ -35,15 +35,15 @@ sub intercept(&) {
);
};
- die $error unless $ok || (blessed($error) && $error->isa('Test::Builder::Result'));
+ die $error unless $ok || (blessed($error) && $error->isa('Test::Builder::Event'));
- return \@results;
+ return \@events;
}
-sub results_are {
- my ($results, @checks) = @_;
+sub events_are {
+ my ($events, @checks) = @_;
- my @res_list = @$results;
+ my @res_list = @$events;
my $overall_name;
my $seek = 0;
@@ -88,7 +88,7 @@ sub results_are {
elsif ($action eq 'end') {
if(@res_list) {
$ok = 0;
- push @diag => "Expected end of results, but more results remain";
+ push @diag => "Expected end of events, but more events remain";
}
$overall_name = shift @checks;
last;
@@ -112,19 +112,19 @@ sub results_are {
if (!$got) {
$ok = 0;
- push @diag => "($id) Wanted result type '$type', But no more results left to check!";
- push @diag => "Full result found was: " . render_result($got);
+ push @diag => "($id) Wanted event type '$type', But no more events left to check!";
+ push @diag => "Full event found was: " . render_event($got);
last;
}
if ($type ne $got->type) {
$ok = 0;
- push @diag => "($id) Wanted result type '$type', But got: '" . $got->type . "'";
- push @diag => "Full result found was: " . render_result($got);
+ push @diag => "($id) Wanted event type '$type', But got: '" . $got->type . "'";
+ push @diag => "Full event found was: " . render_event($got);
last;
}
- my $fields = _simplify_result($got);
+ my $fields = _simplify_event($got);
for my $key (keys %$want) {
my $wval = $want->{$key};
@@ -164,7 +164,7 @@ sub results_are {
}
unless ($ok) {
- push @diag => "Full result found was: " . render_result($got);
+ push @diag => "Full event found was: " . render_event($got);
last;
}
}
@@ -175,21 +175,21 @@ sub results_are {
$overall_name = shift @checks;
}
- builder()->ok($ok, $overall_name || "Got expected results", @diag);
+ builder()->ok($ok, $overall_name || "Got expected events", @diag);
return $ok;
}
-sub display_results {
- my ($results) = @_;
- display_result($_) for @$results;
+sub display_events {
+ my ($events) = @_;
+ display_event($_) for @$events;
}
-sub display_result {
- print STDERR render_result(@_);
+sub display_event {
+ print STDERR render_event(@_);
}
-sub render_result {
- my ($result) = @_;
+sub render_event {
+ my ($event) = @_;
my @order = qw/
name bool real_bool action max
@@ -201,7 +201,7 @@ sub render_result {
tap
/;
- my $fields = _simplify_result($result);
+ my $fields = _simplify_event($event);
my %seen;
my $out = "$fields->{type} => {\n";
@@ -226,7 +226,7 @@ sub render_result {
return $out;
}
-sub _simplify_result {
+sub _simplify_event {
my ($r) = @_;
my $fields = {map { ref $r->{$_} ? () : ($_ => $r->{$_}) } keys %$r};
@@ -279,7 +279,7 @@ __END__
=head1 NAME
-Test::Tester2 - Tools for validating the results produced by your testing
+Test::Tester2 - Tools for validating the events produced by your testing
tools.
=head1 DESCRIPTION
@@ -289,10 +289,10 @@ validate your tools!
=head1 TEST COMPONENT MAP
- [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Result Formatter]
+ [Test Script] > [Test Tool] > [Test::Builder] > [Test::Bulder::Stream] > [Event Formatter]
A test script uses a test tool such as L<Test::More>, which uses Test::Builder
-to produce results. The results are sent to L<Test::Builder::Stream> which then
+to produce events. The events are sent to L<Test::Builder::Stream> which then
forwards them on to one or more formatters. The default formatter is
L<Test::Builder::Fromatter::TAP> which produces TAP output.
@@ -301,19 +301,19 @@ L<Test::Builder::Fromatter::TAP> which produces TAP output.
use Test::More;
use Test::Tester2;
- # Intercept all the Test::Builder::Result objects produced in the block.
- my $results = intercept {
+ # Intercept all the Test::Builder::Event objects produced in the block.
+ my $events = intercept {
ok(1, "pass");
ok(0, "fail");
diag("xxx");
};
# By Hand
- is($results->[0]->{bool}, 1, "First result passed");
+ is($events->[0]->{bool}, 1, "First event passed");
# With help
- results_are(
- $results,
+ events_are(
+ $events,
ok => { id => 'a', bool => 1, name => 'pass' },
ok => { id => 'b1', bool => 0, name => 'fail', line => 7, file => 'my_test.t' },
@@ -325,7 +325,7 @@ L<Test::Builder::Fromatter::TAP> which produces TAP output.
);
# You can combine the 2:
- results_are(
+ events_are(
intercept { ... },
ok => { bool => 1 },
...
@@ -337,71 +337,71 @@ L<Test::Builder::Fromatter::TAP> which produces TAP output.
=over 4
-=item $results = intercept { ... }
+=item $events = intercept { ... }
-Capture the L<Test::Builder::Result> objects generated by tests inside the block.
+Capture the L<Test::Builder::Event> objects generated by tests inside the block.
-=item results_are($results, ...)
+=item events_are($events, ...)
-Validate the given results.
+Validate the given events.
-=back
+=item $dump = render_event($event)
-=item $dump = render_result($result)
+This will produce a simplified string of the event data for easy reading. This
+is useful in debugging, in fact this is the same string that events_are will
+print when there is a mismatch to show you the event.
-This will produce a simplified string of the result data for easy reading. This
-is useful in debugging, in fact this is the same string that results_are will
-print when there is a mismatch to show you the result.
+=item display_event($event)
-=item display_result($result)
+=item display_events($events)
-=item display_results($results)
+These will print the render_event string to STDERR.
-These will print the render_result string to STDERR.
+=back
-=head1 INTERCEPTING RESULTS
+=head1 INTERCEPTING EVENTS
- my $results = intercept {
+ my $events = intercept {
ok(1, "pass");
ok(0, "fail");
diag("xxx");
};
-Any results generated within the block will be intercepted and placed inside
-the C<$results> array reference.
+Any events generated within the block will be intercepted and placed inside
+the C<$events> array reference.
-=head2 RESULT TYPES
+=head2 EVENT TYPES
-All results will be subclasses of L<Test::Builder::Result>
+All events will be subclasses of L<Test::Builder::Event>
=over 4
-=item L<Test::Builder::Result::Ok>
+=item L<Test::Builder::Event::Ok>
-=item L<Test::Builder::Result::Note>
+=item L<Test::Builder::Event::Note>
-=item L<Test::Builder::Result::Diag>
+=item L<Test::Builder::Event::Diag>
-=item L<Test::Builder::Result::Plan>
+=item L<Test::Builder::Event::Plan>
-=item L<Test::Builder::Result::Finish>
+=item L<Test::Builder::Event::Finish>
-=item L<Test::Builder::Result::Bail>
+=item L<Test::Builder::Event::Bail>
-=item L<Test::Builder::Result::Child>
+=item L<Test::Builder::Event::Child>
=back
-=head1 VALIDATING RESULTS
+=head1 VALIDATING EVENTS
- my $results = intercept {
+ my $events = intercept {
ok(1, "pass");
ok(0, "fail");
diag("xxx");
};
- results_are(
- $results,
+ events_are(
+ $events,
name => 'Name of the test', # Name this overall test
ok => { id => 'a', bool => 1, name => 'pass' }, # check an 'ok' with ID 'a'
ok => { id => 'b', bool => 0, name => 'fail' }, # check an 'ok' with ID 'b'
@@ -410,14 +410,14 @@ All results will be subclasses of L<Test::Builder::Result>
'end' # directive 'end'
);
-The first argument to C<results_are()> must be an arrayref containing
-L<Test::Builder::Result> objects. Such an arrayref can be produced by
+The first argument to C<events_are()> must be an arrayref containing
+L<Test::Builder::Event> objects. Such an arrayref can be produced by
C<intercept { ... }>.
-All additional arguments to C<results_are()> must be key value pairs (except
-for 'end'). The key must either be a directive, or a result-type optionally
+All additional arguments to C<events_are()> must be key value pairs (except
+for 'end'). The key must either be a directive, or a event-type optionally
followed by a name. Values for directives are specific to the directives.
-Values for result types must always be hashrefs with 0 or more fields to check.
+Values for event types must always be hashrefs with 0 or more fields to check.
=head2 TYPES AND IDS
@@ -431,9 +431,9 @@ This can be very helpful when tracking down the location of a failing check.
=head2 VALIDATING FIELDS
-The hashref against which results are checked is composed of keys, and values.
+The hashref against which events are checked is composed of keys, and values.
The values may be regular values, which are checked for equality with the
-corresponding property of the result object. Alternatively you can provide a
+corresponding property of the event object. Alternatively you can provide a
regex to match against, or a coderef that validates it for you.
=over 4
@@ -448,18 +448,18 @@ The specified field must match the regular expression.
=item field => sub { my $val = shift; return $val ? 1 : 0 },
-The value from the result will be passed into your coderef as the only
+The value from the event will be passed into your coderef as the only
argument. The coderef should return true for valid, false for invalid.
=back
-=head2 FIELDS PRESENT FOR ALL RESULT TYPES
+=head2 FIELDS PRESENT FOR ALL EVENT TYPES
=over 4
=item pid
-The process ID the result came from.
+The process ID the event came from.
=item depth
@@ -468,11 +468,11 @@ Usually 0, but will be 1 for subtests, 2 for nested subtests, etc.
=item source
Usually $0, but in a subtest it will be the name of the subtest that generated
-the result.
+the event.
=item in_todo
-True if the result was generated inside a todo.
+True if the event was generated inside a todo.
=item line
@@ -496,20 +496,20 @@ package to which errors will be reported
B<Note:> Only present if applicable.
-If the result was generated by an L<Test::Builder::Provider>, this will tell
+If the event was generated by an L<Test::Builder::Provider>, this will tell
you what package provided the tool.
-For example, if the result was provided by C<Test::More::ok()> this will
+For example, if the event was provided by C<Test::More::ok()> this will
contain C<'Test::More'>.
=item tool_name
B<Note:> Only present if applicable.
-If the result was generated by an L<Test::Builder::Provider>, this will tell
+If the event was generated by an L<Test::Builder::Provider>, this will tell
you what the tool was called.
-For example, if the result was provided by C<Test::More::ok()> this will
+For example, if the event was provided by C<Test::More::ok()> this will
contain C<'ok'>.
=item tap
@@ -522,7 +522,7 @@ encoding, the original message however will be untranslated.
=back
-=head2 RESULT SPECIFIC FIELDS
+=head2 EVENT SPECIFIC FIELDS
=head3 ok
@@ -534,7 +534,7 @@ True if the test passed (or failed but is in todo).
=item real_bool
-The actual result of the test, not mangled by todo.
+The actual event of the test, not mangled by todo.
=item name
@@ -623,7 +623,7 @@ child is destroyed.
=head2 VALIDATION DIRECTIVES
-These provide ways to filter or skip results. They apply as seen, and do not
+These provide ways to filter or skip events. They apply as seen, and do not
effect checks before they are seen.
=head3 filter_provider
@@ -638,7 +638,7 @@ effect checks before they are seen.
=item '!filter_providers' => [...]
-Filter results so that you only see ones where the tool provider matches one or
+Filter events so that you only see ones where the tool provider matches one or
more of the conditions specified. Conditions may be a value to match, a regex
to match, or a codref that takes the provider name and validates it returning
either true or false.
@@ -646,27 +646,27 @@ either true or false.
Prefixing with '!' will negate the matching, that is only tool providers that
do not match will be checked.
-The filter will remove any results that do not match for the remainder of the
-checks. Checks before the directive are used will see unfiltered results.
+The filter will remove any events that do not match for the remainder of the
+checks. Checks before the directive are used will see unfiltered events.
example:
- my $results = intercept {
+ my $events = intercept {
Test::More::ok(1, "foo");
Test::More::ok(1, "bar");
Test::More::ok(1, "baz");
Test::Simple::ok(1, "bat");
};
- results_are(
- $results,
+ events_are(
+ $events,
ok => { name => "foo" },
ok => { name => "bar" },
- # From this point on, only more 'Test::Simple' results will be checked.
+ # From this point on, only more 'Test::Simple' events will be checked.
filter_provider => 'Test::Simple',
- # So it goes right to the Test::Simple result.
+ # So it goes right to the Test::Simple event.
ok => { name => "bat" },
);
@@ -684,7 +684,7 @@ example:
=item '!filter_types' => [...]
-Filter results so that you only see ones where the type matches one or more of
+Filter events so that you only see ones where the type matches one or more of
the conditions specified. Conditions may be a value to match, a regex to match,
or a codref that takes the provider name and validates it returning either true
or false.
@@ -692,12 +692,12 @@ or false.
Prefixing with '!' will negate the matching, that is only types that do not
match will be checked.
-The filter will remove any results that do not match for the remainder of the
-checks. Checks before the directive are used will see unfiltered results.
+The filter will remove any events that do not match for the remainder of the
+checks. Checks before the directive are used will see unfiltered events.
example:
- my $results = intercept {
+ my $events = intercept {
ok(1, "foo");
diag("XXX");
@@ -708,8 +708,8 @@ example:
diag("ZZZ");
};
- results_are(
- $results,
+ events_are(
+ $events,
ok => { name => "foo" },
diag => { message => 'XXX' },
ok => { name => "bar" },
@@ -732,11 +732,11 @@ example:
=item skip => '*'
-The numeric form will skip the next # results.
+The numeric form will skip the next # events.
example:
- my $results = intercept {
+ my $events = intercept {
ok(1, "foo");
diag("XXX");
@@ -747,8 +747,8 @@ example:
diag("ZZZ");
};
- results_are(
- $results,
+ events_are(
+ $events,
ok => { name => "foo" },
skip => 1, # Skips the diag
@@ -760,12 +760,12 @@ example:
diag => { message => 'ZZZ' },
);
-When '*' is used as an argument, the checker will skip until a result type
+When '*' is used as an argument, the checker will skip until a event type
matching the next type to check is found.
example:
- my $results = intercept {
+ my $events = intercept {
ok(1, "foo");
diag("XXX");
@@ -775,8 +775,8 @@ example:
ok(1, "bar");
};
- results_are(
- $results,
+ events_are(
+ $events,
ok => { name => "foo" },
skip => '*', # Skip until the next 'ok' is found since that is our next check.
@@ -792,10 +792,10 @@ example:
=item seek => $BOOL
-When turned on (true), any unexpected results will be skipped. You can turn
+When turned on (true), any unexpected events will be skipped. You can turn
this on and off any time.
- my $results = intercept {
+ my $events = intercept {
ok(1, "foo");
diag("XXX");
@@ -807,8 +807,8 @@ this on and off any time.
ok(1, "baz");
};
- results_are(
- $results,
+ events_are(
+ $events,
seek => 1,
ok => { name => "foo" },
@@ -841,12 +841,12 @@ Used to name the test when not using 'end'.
=item end => 'Test Name'
-Used to say that there should not be any more results. Without this any results
+Used to say that there should not be any more events. Without this any events
after your last check are simply ignored. This will generate a failure if any
-unchecked results remain.
+unchecked events remain.
This is also how you can name the overall test. The default name is 'Got
-expected results'.
+expected events'.
=back
@@ -880,3 +880,4 @@ This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
See F<http://www.perl.com/perl/misc/Artistic.html>
+
diff --git a/cpan/Test-Simple/lib/Test/use/ok.pm b/cpan/Test-Simple/lib/Test/use/ok.pm
index 132f1a7bbb..e55e0902a5 100644
--- a/cpan/Test-Simple/lib/Test/use/ok.pm
+++ b/cpan/Test-Simple/lib/Test/use/ok.pm
@@ -3,7 +3,7 @@ use strict;
use warnings;
use 5.005;
-our $VERSION = '1.301001_034';
+our $VERSION = '1.301001_040';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
1;
diff --git a/cpan/Test-Simple/lib/ok.pm b/cpan/Test-Simple/lib/ok.pm
index b94db1a8ec..48c6a37f4f 100644
--- a/cpan/Test-Simple/lib/ok.pm
+++ b/cpan/Test-Simple/lib/ok.pm
@@ -5,7 +5,7 @@ use warnings;
use Test::More 1.301001 ();
use Carp qw/croak/;
-our $VERSION = '1.301001_034';
+our $VERSION = '1.301001_040';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
sub import {
diff --git a/cpan/Test-Simple/t/00test_harness_check.t b/cpan/Test-Simple/t/00test_harness_check.t
deleted file mode 100644
index d6ef13d86b..0000000000
--- a/cpan/Test-Simple/t/00test_harness_check.t
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/usr/bin/perl -w
-
-# A test to make sure the new Test::Harness was installed properly.
-
-use Test::More;
-plan tests => 1;
-
-my $TH_Version = 2.03;
-
-require Test::Harness;
-unless( cmp_ok( eval $Test::Harness::VERSION, '>=', $TH_Version, "T::H version" ) ) {
- diag <<INSTRUCTIONS;
-
-Test::Simple/More/Builder has features which depend on a version of
-Test::Harness greater than $TH_Version. You have $Test::Harness::VERSION.
-Please install a new version from CPAN.
-
-If you've already tried to upgrade Test::Harness and still get this
-message, the new version may be "shadowed" by the old. Check the
-output of Test::Harness's "make install" for "## Differing version"
-messages. You can delete the old version by running
-"make install UNINST=1".
-
-INSTRUCTIONS
-}
-
diff --git a/cpan/Test-Simple/t/Modern/Builder_Result.t b/cpan/Test-Simple/t/Modern/Builder_Event.t
index fa4685bd6d..94fc13bc4a 100644
--- a/cpan/Test-Simple/t/Modern/Builder_Result.t
+++ b/cpan/Test-Simple/t/Modern/Builder_Event.t
@@ -3,29 +3,30 @@ use warnings;
use Test::More 'modern';
-require_ok 'Test::Builder::Result';
+require_ok 'Test::Builder::Event';
-can_ok('Test::Builder::Result', qw/trace pid depth in_todo source constructed/);
+can_ok('Test::Builder::Event', qw/trace pid depth in_todo source constructed/);
-my $one = Test::Builder::Result->new(
+my $one = Test::Builder::Event->new(
trace => {},
depth => 1,
in_todo => 0,
source => 'foo.t',
);
-isa_ok($one, 'Test::Builder::Result');
+isa_ok($one, 'Test::Builder::Event');
is($one->depth, 1, "Got depth");
is($one->pid, $$, "Auto-populated pid");
ok($one->constructed, "auto-populated constructed" );
-is($one->type, 'result', "Got type");
+is($one->type, 'event', "Got type");
is($one->indent, ' ', "Indent 4 spaces per depth");
no warnings 'once';
-@Test::Builder::Result::Fake::ISA = ('Test::Builder::Result');
-bless $one, 'Test::Builder::Result::Fake';
+@Test::Builder::Event::Fake::ISA = ('Test::Builder::Event');
+bless $one, 'Test::Builder::Event::Fake';
is($one->type, 'fake', "Got type (subclass)");
done_testing;
+
diff --git a/cpan/Test-Simple/t/Modern/Builder_Result_Child.t b/cpan/Test-Simple/t/Modern/Builder_Event_Child.t
index acac3729de..3a43c01119 100644
--- a/cpan/Test-Simple/t/Modern/Builder_Result_Child.t
+++ b/cpan/Test-Simple/t/Modern/Builder_Event_Child.t
@@ -3,12 +3,12 @@ use warnings;
use Test::More 'modern';
-require_ok 'Test::Builder::Result::Child';
+require_ok 'Test::Builder::Event::Child';
-my $one = Test::Builder::Result::Child->new();
+my $one = Test::Builder::Event::Child->new();
-isa_ok($one, 'Test::Builder::Result::Child');
-isa_ok($one, 'Test::Builder::Result');
+isa_ok($one, 'Test::Builder::Event::Child');
+isa_ok($one, 'Test::Builder::Event');
can_ok($one, qw/name is_subtest action/);
diff --git a/cpan/Test-Simple/t/Modern/Builder_Result_Diag.t b/cpan/Test-Simple/t/Modern/Builder_Event_Diag.t
index 8af1436dab..548ac61cfe 100644
--- a/cpan/Test-Simple/t/Modern/Builder_Result_Diag.t
+++ b/cpan/Test-Simple/t/Modern/Builder_Event_Diag.t
@@ -4,14 +4,14 @@ use warnings;
use Test::More 'modern';
use Scalar::Util qw/isweak/;
-require_ok 'Test::Builder::Result::Diag';
+require_ok 'Test::Builder::Event::Diag';
-can_ok('Test::Builder::Result::Diag', qw/message/);
+can_ok('Test::Builder::Event::Diag', qw/message/);
-my $one = Test::Builder::Result::Diag->new(message => "\nFooo\nBar\nBaz\n");
+my $one = Test::Builder::Event::Diag->new(message => "\nFooo\nBar\nBaz\n");
-isa_ok($one, 'Test::Builder::Result::Diag');
-isa_ok($one, 'Test::Builder::Result');
+isa_ok($one, 'Test::Builder::Event::Diag');
+isa_ok($one, 'Test::Builder::Event');
is($one->to_tap, "\n# Fooo\n# Bar\n# Baz\n", "Got tap output");
@@ -20,8 +20,8 @@ is($one->to_tap, "# foo bar\n", "simple tap");
is($one->linked, undef, "Not linked");
-require Test::Builder::Result::Ok;
-my $ok = Test::Builder::Result::Ok->new(
+require Test::Builder::Event::Ok;
+my $ok = Test::Builder::Event::Ok->new(
bool => 0,
real_bool => 0,
trace => Test::Builder::Trace->new
@@ -31,7 +31,7 @@ $one->linked($ok);
is($one->linked, $ok, "Now linked");
ok(isweak($one->{linked}), "Link reference is weak");
-my $two = Test::Builder::Result::Diag->new(message => 'foo', linked => $ok);
+my $two = Test::Builder::Event::Diag->new(message => 'foo', linked => $ok);
ok(isweak($two->{linked}), "Link reference is weak even on construction");
done_testing;
diff --git a/cpan/Test-Simple/t/Modern/Builder_Event_Finish.t b/cpan/Test-Simple/t/Modern/Builder_Event_Finish.t
new file mode 100644
index 0000000000..ac9c7c3d0b
--- /dev/null
+++ b/cpan/Test-Simple/t/Modern/Builder_Event_Finish.t
@@ -0,0 +1,15 @@
+use strict;
+use warnings;
+
+use Test::More 'modern';
+
+require_ok 'Test::Builder::Event::Finish';
+
+my $one = Test::Builder::Event::Finish->new();
+
+isa_ok($one, 'Test::Builder::Event::Finish');
+isa_ok($one, 'Test::Builder::Event');
+
+can_ok($one, qw/tests_run tests_failed/);
+
+done_testing;
diff --git a/cpan/Test-Simple/t/Modern/Builder_Event_Note.t b/cpan/Test-Simple/t/Modern/Builder_Event_Note.t
new file mode 100644
index 0000000000..8e71157cc4
--- /dev/null
+++ b/cpan/Test-Simple/t/Modern/Builder_Event_Note.t
@@ -0,0 +1,17 @@
+use strict;
+use warnings;
+
+use Test::More 'modern';
+
+require_ok 'Test::Builder::Event::Note';
+
+can_ok('Test::Builder::Event::Note', qw/message/);
+
+my $one = Test::Builder::Event::Note->new(message => "\nFooo\nBar\nBaz\n");
+
+isa_ok($one, 'Test::Builder::Event::Note');
+isa_ok($one, 'Test::Builder::Event');
+
+is($one->to_tap, "\n# Fooo\n# Bar\n# Baz\n", "Got tap output");
+
+done_testing;
diff --git a/cpan/Test-Simple/t/Modern/Builder_Result_Ok.t b/cpan/Test-Simple/t/Modern/Builder_Event_Ok.t
index fb8239ef63..bf35a8d71d 100644
--- a/cpan/Test-Simple/t/Modern/Builder_Result_Ok.t
+++ b/cpan/Test-Simple/t/Modern/Builder_Event_Ok.t
@@ -3,11 +3,11 @@ use warnings;
use Test::More 'modern';
-require_ok 'Test::Builder::Result::Ok';
+require_ok 'Test::Builder::Event::Ok';
-isa_ok('Test::Builder::Result::Ok', 'Test::Builder::Result');
+isa_ok('Test::Builder::Event::Ok', 'Test::Builder::Event');
-can_ok('Test::Builder::Result::Ok', qw/bool real_bool name todo skip/);
+can_ok('Test::Builder::Event::Ok', qw/bool real_bool name todo skip/);
my $trace = bless {
_report => bless {
@@ -27,7 +27,7 @@ my %init = (
skip => undef,
);
-my $one = Test::Builder::Result::Ok->new(%init);
+my $one = Test::Builder::Event::Ok->new(%init);
is($one->to_tap(1), "ok 1 - fake\n", "TAP output, success");
@@ -55,25 +55,25 @@ ok( !eval { $one->to_tap; 1}, "Different reasons dies" );
like( $@, qr{^2 different reasons to skip/todo: \$VAR1}, "Useful message" );
-my $two = Test::Builder::Result::Ok->new(%init);
+my $two = Test::Builder::Event::Ok->new(%init);
-is($two->diag, undef, "No diag on bool => true result");
+is($two->diag, undef, "No diag on bool => true event");
-$two = Test::Builder::Result::Ok->new(%init, in_todo => 1, todo => 'blah', skip => 'blah', real_bool => 1);
-is($two->diag, undef, "No diag on todo+skip result");
+$two = Test::Builder::Event::Ok->new(%init, in_todo => 1, todo => 'blah', skip => 'blah', real_bool => 1);
+is($two->diag, undef, "No diag on todo+skip event");
-$two = Test::Builder::Result::Ok->new(%init, skip => 'blah', real_bool => 0, bool => 0);
-ok($two->diag, "added diag on skip result");
+$two = Test::Builder::Event::Ok->new(%init, skip => 'blah', real_bool => 0, bool => 0);
+ok($two->diag, "added diag on skip event");
-$two = Test::Builder::Result::Ok->new(%init, bool => 0, real_bool => 0);
+$two = Test::Builder::Event::Ok->new(%init, bool => 0, real_bool => 0);
ok($two->diag, "Have diag");
$two->clear_diag;
is($two->diag, undef, "Removed diag");
-my $diag_a = Test::Builder::Result::Diag->new(message => 'foo');
-my $diag_b = Test::Builder::Result::Diag->new(message => 'bar');
+my $diag_a = Test::Builder::Event::Diag->new(message => 'foo');
+my $diag_b = Test::Builder::Event::Diag->new(message => 'bar');
-$two = Test::Builder::Result::Ok->new(%init);
+$two = Test::Builder::Event::Ok->new(%init);
$two->diag($diag_a);
is_deeply($two->diag, [$diag_a], "pushed diag");
is($diag_a->linked, $two, "Added link");
@@ -90,10 +90,10 @@ is($two->diag, undef, "Removed diag");
ok(!$diag_a->linked, "Removed link");
ok(!$diag_b->linked, "Removed link");
-$two = Test::Builder::Result::Ok->new(%init, in_todo => 1, todo => 'blah', real_bool => 0);
+$two = Test::Builder::Event::Ok->new(%init, in_todo => 1, todo => 'blah', real_bool => 0);
ok($two->diag->[0]->{in_todo}, "in_todo passed to the diag");
-my $d = Test::Builder::Result::Ok->new(
+my $d = Test::Builder::Event::Ok->new(
bool => 0,
real_bool => 0,
name => 'blah',
@@ -104,3 +104,4 @@ my $d = Test::Builder::Result::Ok->new(
is(@{$d->diag}, 2, "Normal Diag + the one we spec'd");
done_testing;
+
diff --git a/cpan/Test-Simple/t/Modern/Builder_Result_Plan.t b/cpan/Test-Simple/t/Modern/Builder_Event_Plan.t
index 97106aa036..ee70ce1299 100644
--- a/cpan/Test-Simple/t/Modern/Builder_Result_Plan.t
+++ b/cpan/Test-Simple/t/Modern/Builder_Event_Plan.t
@@ -3,12 +3,12 @@ use warnings;
use Test::More 'modern';
-require_ok 'Test::Builder::Result::Plan';
+require_ok 'Test::Builder::Event::Plan';
-my $one = Test::Builder::Result::Plan->new;
+my $one = Test::Builder::Event::Plan->new;
-isa_ok($one, 'Test::Builder::Result::Plan');
-isa_ok($one, 'Test::Builder::Result');
+isa_ok($one, 'Test::Builder::Event::Plan');
+isa_ok($one, 'Test::Builder::Event');
can_ok($one, qw/max directive reason/);
diff --git a/cpan/Test-Simple/t/Modern/Builder_Fork.t b/cpan/Test-Simple/t/Modern/Builder_Fork.t
index d5334cf17c..11dbb89799 100644
--- a/cpan/Test-Simple/t/Modern/Builder_Fork.t
+++ b/cpan/Test-Simple/t/Modern/Builder_Fork.t
@@ -2,7 +2,18 @@ use strict;
use warnings;
use Test::More;
use Test::Tester2;
-use Test::Builder::Result::Ok;
+use Test::Builder::Event::Ok;
+use Config;
+
+my $Can_Fork = $Config{d_fork} ||
+ (($^O eq 'MSWin32' || $^O eq 'NetWare') and
+ $Config{useithreads} and
+ $Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/
+ );
+
+if( !$Can_Fork ) {
+ plan 'skip_all' => "This system cannot fork";
+}
my $CLASS = 'Test::Builder::Fork';
require_ok $CLASS;
@@ -13,14 +24,14 @@ ok($one->tmpdir, "Got temp dir");
my $TB = Test::Builder->new;
-my $Ok = Test::Builder::Result::Ok->new(
+my $Ok = Test::Builder::Event::Ok->new(
bool => 1,
real_bool => 1,
name => 'fake',
);
my $out = $one->handle($Ok);
-ok(!$out, "Did not snatch result in parent process");
+ok(!$out, "Did not snatch event in parent process");
if (my $pid = fork()) {
waitpid($pid, 0);
@@ -30,12 +41,12 @@ else {
exit 0;
}
-my $results = intercept { $one->cull() };
+my $events = intercept { $one->cull() };
is_deeply(
- $results,
+ $events,
[$Ok],
- "got result after cull"
+ "got event after cull"
);
done_testing;
diff --git a/cpan/Test-Simple/t/Modern/Builder_Result_Finish.t b/cpan/Test-Simple/t/Modern/Builder_Result_Finish.t
deleted file mode 100644
index 52a07a7d10..0000000000
--- a/cpan/Test-Simple/t/Modern/Builder_Result_Finish.t
+++ /dev/null
@@ -1,15 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More 'modern';
-
-require_ok 'Test::Builder::Result::Finish';
-
-my $one = Test::Builder::Result::Finish->new();
-
-isa_ok($one, 'Test::Builder::Result::Finish');
-isa_ok($one, 'Test::Builder::Result');
-
-can_ok($one, qw/tests_run tests_failed/);
-
-done_testing;
diff --git a/cpan/Test-Simple/t/Modern/Builder_Result_Note.t b/cpan/Test-Simple/t/Modern/Builder_Result_Note.t
deleted file mode 100644
index c385d7e8de..0000000000
--- a/cpan/Test-Simple/t/Modern/Builder_Result_Note.t
+++ /dev/null
@@ -1,17 +0,0 @@
-use strict;
-use warnings;
-
-use Test::More 'modern';
-
-require_ok 'Test::Builder::Result::Note';
-
-can_ok('Test::Builder::Result::Note', qw/message/);
-
-my $one = Test::Builder::Result::Note->new(message => "\nFooo\nBar\nBaz\n");
-
-isa_ok($one, 'Test::Builder::Result::Note');
-isa_ok($one, 'Test::Builder::Result');
-
-is($one->to_tap, "\n# Fooo\n# Bar\n# Baz\n", "Got tap output");
-
-done_testing;
diff --git a/cpan/Test-Simple/t/Modern/Builder_Trace_Frame.t b/cpan/Test-Simple/t/Modern/Builder_Trace_Frame.t
index f363f082e2..ee4fde5b4e 100644
--- a/cpan/Test-Simple/t/Modern/Builder_Trace_Frame.t
+++ b/cpan/Test-Simple/t/Modern/Builder_Trace_Frame.t
@@ -10,13 +10,13 @@ require_ok $CLASS;
my @BUILDERS = (
'Test::Builder::Trace',
'Test::Builder',
- 'Test::Builder::Result',
- 'Test::Builder::Result::Bail',
- 'Test::Builder::Result::Child',
- 'Test::Builder::Result::Diag',
- 'Test::Builder::Result::Note',
- 'Test::Builder::Result::Ok',
- 'Test::Builder::Result::Plan',
+ 'Test::Builder::Event',
+ 'Test::Builder::Event::Bail',
+ 'Test::Builder::Event::Child',
+ 'Test::Builder::Event::Diag',
+ 'Test::Builder::Event::Note',
+ 'Test::Builder::Event::Ok',
+ 'Test::Builder::Event::Plan',
'Test::Builder::Stream',
'Test::Builder::Trace',
'Test::Builder::Util',
@@ -85,36 +85,4 @@ is_deeply(
"provider tool (anon)"
);
-
-{
- package Test::A;
- use Test::More;
-
- package Test::B;
- our $TODO = "";
-
- package Test::C;
- our $TODO = "xxx";
-
- package Test::D;
- our $TODO;
-
- package Test::E;
-}
-
-my $A = $CLASS->new(2, 'Test::A', __FILE__, 42, 'Test::A::whatever');
-ok($A->todo, "todo cause of Test::More");
-
-my $B = $CLASS->new(2, 'Test::B', __FILE__, 42, 'Test::A::whatever');
-ok($B->todo, "todo cause defined");
-
-my $C = $CLASS->new(2, 'Test::C', __FILE__, 42, 'Test::A::whatever');
-ok($C->todo, "todo cause set");
-
-my $D = $CLASS->new(2, 'Test::D', __FILE__, 42, 'Test::A::whatever');
-ok(!$D->todo, "Not todo cause not defined (not ideal, but can't fix)");
-
-my $E = $CLASS->new(2, 'Test::E', __FILE__, 42, 'Test::A::whatever');
-ok(!$E->todo, "Not todo cause variable does not exist");
-
done_testing;
diff --git a/cpan/Test-Simple/t/Modern/More.t b/cpan/Test-Simple/t/Modern/More.t
index 41edc7e18f..a4d6bb0600 100644
--- a/cpan/Test-Simple/t/Modern/More.t
+++ b/cpan/Test-Simple/t/Modern/More.t
@@ -2,8 +2,11 @@ use strict;
use warnings;
use Test::More qw/modern/;
use Test::Tester2;
+use PerlIO;
use utf8;
+our $default_utf8 = grep { $_ eq 'utf8' } PerlIO::get_layers(\*STDOUT);
+
helpers qw/my_ok/;
sub my_ok { Test::Builder->new->ok(@_) }
@@ -18,7 +21,7 @@ sub my_nester(&) {
my @lines;
-my $results = intercept {
+my $events = intercept {
my_ok( 1, "good" ); push @lines => __LINE__;
my_ok( 0, "bad" ); push @lines => __LINE__;
@@ -31,8 +34,8 @@ my $results = intercept {
}; push @lines => __LINE__;
};
-results_are(
- $results,
+events_are(
+ $events,
ok => { line => $lines[0], bool => 1, name => "good" },
ok => { line => $lines[1], bool => 0, name => "bad" },
@@ -57,14 +60,14 @@ sub helped(&) {
diag( 'teardown' );
};
-$results = intercept {
+$events = intercept {
helped {
ok(0 ,'helped test' ); $place{helped} = __LINE__; 0;
}; $place{inhelp} = __LINE__;
};
-results_are(
- $results,
+events_are(
+ $events,
diag => { message => 'setup' },
@@ -85,7 +88,8 @@ ok($ok, "Can import \$TODO");
use Test::More 'utf8';
use Test::Tester2;
- my $results = intercept { ok(1, "blah") };
+ my $events = intercept { ok(1, "blah") };
+ is($events->[0]->encoding, 'utf8', "utf8 encoding set for modern");
my @warnings;
{
@@ -99,13 +103,16 @@ ok($ok, "Can import \$TODO");
ok(!@warnings, "no warnings");
}
-{
+SKIP: {
package main_old;
use Test::More;
use Test::Tester2;
- my $results = intercept { ok(1, "blah") };
- is($results->[0]->encoding, 'legacy', "legacy encoding set for non-modern");
+ skip "UTF8 by default, skipping legacy" => 5
+ if $main::default_utf8;
+
+ my $events = intercept { ok(1, "blah") };
+ is($events->[0]->encoding, 'legacy', "legacy encoding set for non-modern");
my @warnings;
{
@@ -135,15 +142,36 @@ ok($ok, "Can import \$TODO");
package main_oblivious;
use Test::Tester2;
- my $results = intercept { Test::More::ok(1, "blah") };
- Test::More::is($results->[0]->encoding, undef, "no encoding set for non-consumer");
+ my $events = intercept { Test::More::ok(1, "blah") };
+ Test::More::is($events->[0]->encoding, undef, "no encoding set for non-consumer");
+}
+
+{
+ package arg_encoding;
+ use Test::More encoding => 'utf8';
+ use Test::Tester2;
+
+ my $events = intercept { ok(1, "blah") };
+ is($events->[0]->encoding, 'utf8', "utf8 encoding set by arg encoding");
+
+ my @warnings;
+ {
+ local $SIG{__WARN__} = sub { push @warnings => @_ };
+ ok(1, "Ճȴģȳф utf8 name");
+ }
+ ok(!@warnings, "no warnings - argument 'encoding'");
}
+
require PerlIO;
my $legacy = Test::Builder->new->tap->io_set('legacy')->[0];
my $modern = Test::Builder->new->tap->io_set('utf8')->[0];
-ok( !(grep { $_ eq 'utf8' } PerlIO::get_layers(\*STDOUT)), "Did not add utf8 to STDOUT" );
-ok( !(grep { $_ eq 'utf8' } PerlIO::get_layers($legacy)), "Did not add utf8 to legacy" );
-ok( (grep { $_ eq 'utf8' } PerlIO::get_layers($modern)), "Did add utf8 to UTF8 handle" );
+ok( (grep { $_ eq 'utf8' } PerlIO::get_layers($modern)), "Did add utf8 to UTF8 handle" );
+SKIP: {
+ skip "UTF8 by default, skipping legacy" => 2
+ if $main::default_utf8;
+ ok( !(grep { $_ eq 'utf8' } PerlIO::get_layers(\*STDOUT)), "Did not add utf8 to STDOUT" );
+ ok( !(grep { $_ eq 'utf8' } PerlIO::get_layers($legacy)), "Did not add utf8 to legacy" );
+}
done_testing;
diff --git a/cpan/Test-Simple/t/Modern/NotTB15.t b/cpan/Test-Simple/t/Modern/NotTB15.t
index dda51ae8a2..55453976f0 100644
--- a/cpan/Test-Simple/t/Modern/NotTB15.t
+++ b/cpan/Test-Simple/t/Modern/NotTB15.t
@@ -44,3 +44,4 @@ Can't locate object method "$method" via package "Test::Builder" at $file line $
}
done_testing;
+
diff --git a/cpan/Test-Simple/t/Modern/Simple.t b/cpan/Test-Simple/t/Modern/Simple.t
index fde93ea93e..7946f89f40 100644
--- a/cpan/Test-Simple/t/Modern/Simple.t
+++ b/cpan/Test-Simple/t/Modern/Simple.t
@@ -6,12 +6,13 @@ use Test::Tester2;
ok(Test::Simple->can('TB_PROVIDER_META'), "Test::Simple is a provider");
-my $results = intercept {
+my $events = intercept {
ok( 1, "A pass" );
ok( 0, "A fail" );
};
-ok(@$results == 3, "found 3 results (2 oks, and 1 diag)");
+ok(@$events == 3, "found 3 events (2 oks, and 1 diag)");
+
+ok($events->[0]->trace->report->line == 10, "Reported correct line event 1");
+ok($events->[2]->trace->report->line == 11, "Reported correct line event 2");
-ok($results->[0]->trace->report->line == 10, "Reported correct line result 1");
-ok($results->[2]->trace->report->line == 11, "Reported correct line result 2");
diff --git a/cpan/Test-Simple/t/Modern/Tester2.t b/cpan/Test-Simple/t/Modern/Tester2.t
index 2d56440a55..d0680ca9e8 100644
--- a/cpan/Test-Simple/t/Modern/Tester2.t
+++ b/cpan/Test-Simple/t/Modern/Tester2.t
@@ -4,43 +4,43 @@ use warnings;
use Test::More 'modern';
use Test::Tester2;
-can_ok( __PACKAGE__, 'intercept', 'results_are' );
+can_ok( __PACKAGE__, 'intercept', 'events_are' );
-my $results = intercept {
+my $events = intercept {
ok(1, "Woo!");
ok(0, "Boo!");
};
-isa_ok($results->[0], 'Test::Builder::Result::Ok');
-is($results->[0]->bool, 1, "Got one success");
-is($results->[0]->name, "Woo!", "Got test name");
+isa_ok($events->[0], 'Test::Builder::Event::Ok');
+is($events->[0]->bool, 1, "Got one success");
+is($events->[0]->name, "Woo!", "Got test name");
-isa_ok($results->[1], 'Test::Builder::Result::Ok');
-is($results->[1]->bool, 0, "Got one fail");
-is($results->[1]->name, "Boo!", "Got test name");
+isa_ok($events->[1], 'Test::Builder::Event::Ok');
+is($events->[1]->bool, 0, "Got one fail");
+is($events->[1]->name, "Boo!", "Got test name");
-$results = intercept {
+$events = intercept {
ok(1, "Woo!");
BAIL_OUT("Ooops");
ok(0, "Should not see this");
};
-is(@$results, 2, "Only got 2");
-isa_ok($results->[0], 'Test::Builder::Result::Ok');
-isa_ok($results->[1], 'Test::Builder::Result::Bail');
+is(@$events, 2, "Only got 2");
+isa_ok($events->[0], 'Test::Builder::Event::Ok');
+isa_ok($events->[1], 'Test::Builder::Event::Bail');
-$results = intercept {
+$events = intercept {
plan skip_all => 'All tests are skipped';
ok(1, "Woo!");
BAIL_OUT("Ooops");
ok(0, "Should not see this");
};
-is(@$results, 1, "Only got 1");
-isa_ok($results->[0], 'Test::Builder::Result::Plan');
+is(@$events, 1, "Only got 1");
+isa_ok($events->[0], 'Test::Builder::Event::Plan');
-results_are(
+events_are(
intercept {
- results_are(
+ events_are(
intercept { ok(1, "foo") },
ok => {id => 'blah', bool => 0},
end => 'Lets name this test!',
@@ -52,7 +52,7 @@ results_are(
diag => {message => qr{Failed test 'Lets name this test!'.*at (\./)?t/Modern/Tester2\.t line}s},
diag => {message => q{(ok blah) Wanted bool => '0', but got bool => '1'}},
diag => {message => <<" EOT"},
-Full result found was: ok => {
+Full event found was: ok => {
name: foo
bool: 1
real_bool: 1
@@ -71,9 +71,9 @@ Full result found was: ok => {
end => 'Failure diag checking',
);
-results_are(
+events_are(
intercept {
- results_are(
+ events_are(
intercept { ok(1, "foo"); ok(1, "bar") },
ok => {id => 'blah', bool => 1},
'end'
@@ -83,40 +83,25 @@ results_are(
ok => {id => 'first', bool => 0},
diag => {},
- diag => {message => q{Expected end of results, but more results remain}},
+ diag => {message => q{Expected end of events, but more events remain}},
end => 'skipping a diag',
);
-{
- my @warn;
- local $SIG{__WARN__} = sub { push @warn => @_ };
- my $doit = sub {
- local $Test::Builder::Level = $Test::Builder::Level + 1;
- ok(1, "example");
- };
-
- # The results generated here are to be ignored. We are just checking on warnings.
- intercept { $doit->(); $doit->(); $doit->() };
-
- is(@warn, 1, "got a warning, but only once");
- like($warn[0], qr/\$Test::Builder::Level was used to trace a test! \$Test::Builder::Level is deprecated!/, "Expected warning");
-}
-
DOCS_1: {
- # Intercept all the Test::Builder::Result objects produced in the block.
- my $results = intercept {
+ # Intercept all the Test::Builder::Event objects produced in the block.
+ my $events = intercept {
ok(1, "pass");
ok(0, "fail");
diag("xxx");
};
# By Hand
- is($results->[0]->{bool}, 1, "First result passed");
+ is($events->[0]->{bool}, 1, "First event passed");
# With help
- results_are(
- $results,
+ events_are(
+ $events,
ok => { id => 'a', bool => 1, name => 'pass' },
ok => { id => 'b', bool => 0, name => 'fail' },
diag => { message => qr/Failed test 'fail'/ },
@@ -127,22 +112,22 @@ DOCS_1: {
DOCS_2: {
require Test::Simple;
- my $results = intercept {
+ my $events = intercept {
Test::More::ok(1, "foo");
Test::More::ok(1, "bar");
Test::More::ok(1, "baz");
Test::Simple::ok(1, "bat");
};
- results_are(
- $results,
+ events_are(
+ $events,
ok => { name => "foo" },
ok => { name => "bar" },
- # From this point on, only more 'Test::Simple' results will be checked.
+ # From this point on, only more 'Test::Simple' events will be checked.
filter_provider => 'Test::Simple',
- # So it goes right to the Test::Simple result.
+ # So it goes right to the Test::Simple event.
ok => { name => "bat" },
end => 'docs 2',
@@ -150,7 +135,7 @@ DOCS_2: {
}
DOCS_3: {
- my $results = intercept {
+ my $events = intercept {
ok(1, "foo");
diag("XXX");
@@ -161,8 +146,8 @@ DOCS_3: {
diag("ZZZ");
};
- results_are(
- $results,
+ events_are(
+ $events,
ok => { name => "foo" },
diag => { message => 'XXX' },
ok => { name => "bar" },
@@ -179,7 +164,7 @@ DOCS_3: {
}
DOCS_4: {
- my $results = intercept {
+ my $events = intercept {
ok(1, "foo");
diag("XXX");
@@ -190,8 +175,8 @@ DOCS_4: {
diag("ZZZ");
};
- results_are(
- $results,
+ events_are(
+ $events,
ok => { name => "foo" },
skip => 1, # Skips the diag
@@ -207,7 +192,7 @@ DOCS_4: {
}
DOCS_5: {
- my $results = intercept {
+ my $events = intercept {
ok(1, "foo");
diag("XXX");
@@ -217,8 +202,8 @@ DOCS_5: {
ok(1, "bar");
};
- results_are(
- $results,
+ events_are(
+ $events,
ok => { name => "foo" },
skip => '*', # Skip until the next 'ok' is found since that is our next check.
@@ -230,7 +215,7 @@ DOCS_5: {
}
DOCS_6: {
- my $results = intercept {
+ my $events = intercept {
ok(1, "foo");
diag("XXX");
@@ -242,10 +227,10 @@ DOCS_6: {
ok(1, "baz");
};
- results_are(
+ events_are(
intercept {
- results_are(
- $results,
+ events_are(
+ $events,
name => 'docs 6 inner',
@@ -263,8 +248,8 @@ DOCS_6: {
ok => { bool => 0 },
diag => { message => qr/Failed test 'docs 6 inner'/ },
- diag => { message => q{(ok 3) Wanted result type 'ok', But got: 'diag'} },
- diag => { message => qr/Full result found was:/ },
+ diag => { message => q{(ok 3) Wanted event type 'ok', But got: 'diag'} },
+ diag => { message => qr/Full event found was:/ },
end => 'docs 6',
);
diff --git a/cpan/Test-Simple/t/Modern/Tester2_subtest.t b/cpan/Test-Simple/t/Modern/Tester2_subtest.t
index 861e098a3a..236575fee5 100644
--- a/cpan/Test-Simple/t/Modern/Tester2_subtest.t
+++ b/cpan/Test-Simple/t/Modern/Tester2_subtest.t
@@ -5,7 +5,7 @@ use utf8;
use Test::More qw/modern/;
use Test::Tester2;
-my $results = intercept {
+my $events = intercept {
ok(0, "test failure" );
ok(1, "test success" );
@@ -23,8 +23,8 @@ my $results = intercept {
ok(1, "another test success" );
};
-results_are(
- $results,
+events_are(
+ $events,
ok => {bool => 0},
diag => {},
@@ -60,7 +60,7 @@ results_are(
diag => {},
ok => {bool => 1},
- end => "subtest results as expected",
+ end => "subtest events as expected",
);
done_testing;
diff --git a/cpan/Test-Simple/t/Modern/encoding_test.t b/cpan/Test-Simple/t/Modern/encoding_test.t
index 23cf34274f..83a0d49b4d 100644
--- a/cpan/Test-Simple/t/Modern/encoding_test.t
+++ b/cpan/Test-Simple/t/Modern/encoding_test.t
@@ -26,12 +26,12 @@ $trace_legacy->report->file($filename);
is($trace_utf8->encoding, 'utf8', "got a utf8 trace");
is($trace_legacy->encoding, 'legacy', "got a legacy trace");
-my $diag_utf8 = Test::Builder::Result::Diag->new(
+my $diag_utf8 = Test::Builder::Event::Diag->new(
message => "failed blah de blah\nFatal error in $filename line 42.\n",
trace => $trace_utf8,
);
-my $diag_legacy = Test::Builder::Result::Diag->new(
+my $diag_legacy = Test::Builder::Event::Diag->new(
message => "failed blah de blah\nFatal error in $filename line 42.\n",
trace => $trace_legacy,
);
diff --git a/cpan/Test-Simple/t/Modern/tracing.t b/cpan/Test-Simple/t/Modern/tracing.t
index f23060a6d9..e41ea14365 100644
--- a/cpan/Test-Simple/t/Modern/tracing.t
+++ b/cpan/Test-Simple/t/Modern/tracing.t
@@ -2,7 +2,7 @@ use strict;
use warnings;
sub trace {
- my $trace = Test::Builder->trace_test;
+ my $trace = Test::Builder->new->trace_test;
return $trace;
}
@@ -60,7 +60,7 @@ BEGIN {
sub do_it {
my $builder = __PACKAGE__->builder;
- my $trace = Test::Builder->trace_test;
+ my $trace = Test::Builder->new->trace_test;
return $trace;
}
@@ -73,7 +73,7 @@ BEGIN {
# line 1800
sub do_nestit(&) {
my ($code) = @_;
- my $trace = Test::Builder->trace_test;
+ my $trace = Test::Builder->new->trace_test;
# TODO: I Think this is wrong...
local $Test::Builder::Level = $Test::Builder::Level + 3;
$code->();
@@ -138,36 +138,36 @@ is($trace->report->package, 'XXX::Tester', "got correct package");
is($trace->report->level, 1, "Is level");
ok(!$trace->report->provider_tool, "No Tool");
-my @results;
+my @events;
# Here we simulate subtests
# line 2800
$trace = nestit {
- push @results => explodable();
- push @results => explodadouble();
- push @results => explode();
- push @results => do_it();
- push @results => do_it_2();
+ push @events => explodable();
+ push @events => explodadouble();
+ push @events => explode();
+ push @events => do_it();
+ push @events => do_it_2();
}; # Report line is here
is($trace->report->line, 2806, "Nesting tool reported correct line");
-is($results[0]->report->line, 2801, "Got nested line, our tool");
-is($results[1]->report->line, 2200, "Nested, but tool is not 'provided' so goes up to provided");
-is($results[2]->report->line, 2803, "Got nested line external tool");
-is($results[3]->report->line, 2804, "Got nested line legacy tool");
-is($results[4]->report->line, 2805, "Got nested line deeper legacy tool");
+is($events[0]->report->line, 2801, "Got nested line, our tool");
+is($events[1]->report->line, 2200, "Nested, but tool is not 'provided' so goes up to provided");
+is($events[2]->report->line, 2803, "Got nested line external tool");
+is($events[3]->report->line, 2804, "Got nested line legacy tool");
+is($events[4]->report->line, 2805, "Got nested line deeper legacy tool");
-@results = ();
+@events = ();
my $outer;
# line 2900
$outer = nestit {
$trace = nestit {
- push @results => explodable();
- push @results => explodadouble();
- push @results => explode();
- push @results => do_it();
- push @results => do_it_2();
+ push @events => explodable();
+ push @events => explodadouble();
+ push @events => explode();
+ push @events => do_it();
+ push @events => do_it_2();
}; # Report line is here
};
@@ -176,47 +176,48 @@ is($outer->report->line, 2908, "Nesting tool reported correct line");
is($trace->report->line, 2907, "Nesting tool reported correct line");
# line 2930
-is($results[0]->report->line, 2902, "Got nested line, our tool");
-is($results[1]->report->line, 2200, "Nested, but tool is not 'provided' so goes up to provided");
-is($results[2]->report->line, 2904, "Got nested line external tool");
-is($results[3]->report->line, 2905, "Got nested line legacy tool");
-is($results[4]->report->line, 2906, "Got nested line deeper legacy tool");
+is($events[0]->report->line, 2902, "Got nested line, our tool");
+is($events[1]->report->line, 2200, "Nested, but tool is not 'provided' so goes up to provided");
+is($events[2]->report->line, 2904, "Got nested line external tool");
+is($events[3]->report->line, 2905, "Got nested line legacy tool");
+is($events[4]->report->line, 2906, "Got nested line deeper legacy tool");
-@results = ();
+@events = ();
# line 3000
$trace = nonest {
- push @results => explodable();
- push @results => explodadouble();
- push @results => explode();
- push @results => do_it();
- push @results => do_it_2();
+ push @events => explodable();
+ push @events => explodadouble();
+ push @events => explode();
+ push @events => do_it();
+ push @events => do_it_2();
}; # Report line is here
is($trace->report->line, 3006, "NoNesting tool reported correct line");
-is($results[0]->report->line, 3006, "Lowest tool is nonest, so these get squashed (Which is why you use nesting)");
-is($results[1]->report->line, 3006, "Lowest tool is nonest, so these get squashed (Which is why you use nesting)");
-is($results[2]->report->line, 3006, "Lowest tool is nonest, so these get squashed (Which is why you use nesting)");
-is($results[3]->report->line, 3006, "Lowest tool is nonest, so these get squashed(Legacy) (Which is why you use nesting)");
-is($results[4]->report->line, 3006, "Lowest tool is nonest, so these get squashed(Legacy) (Which is why you use nesting)");
+is($events[0]->report->line, 3006, "Lowest tool is nonest, so these get squashed (Which is why you use nesting)");
+is($events[1]->report->line, 3006, "Lowest tool is nonest, so these get squashed (Which is why you use nesting)");
+is($events[2]->report->line, 3006, "Lowest tool is nonest, so these get squashed (Which is why you use nesting)");
+is($events[3]->report->line, 3006, "Lowest tool is nonest, so these get squashed(Legacy) (Which is why you use nesting)");
+is($events[4]->report->line, 3006, "Lowest tool is nonest, so these get squashed(Legacy) (Which is why you use nesting)");
-@results = ();
+@events = ();
# line 3100
$trace = do_nestit {
- push @results => explodable();
- push @results => explodadouble();
- push @results => explode();
- push @results => do_it();
- push @results => do_it_2();
+ push @events => explodable();
+ push @events => explodadouble();
+ push @events => explode();
+ push @events => do_it();
+ push @events => do_it_2();
}; # Report line is here
is($trace->report->line, 3106, "Nesting tool reported correct line");
-is($results[0]->report->line, 3101, "Got nested line, our tool");
-is($results[1]->report->line, 2200, "Nested, but tool is not 'provided' so goes up to provided");
-is($results[2]->report->line, 3103, "Got nested line external tool");
-is($results[3]->report->line, 3104, "Got nested line legacy tool");
-is($results[4]->report->line, 3105, "Got nested line deeper legacy tool");
+is($events[0]->report->line, 3101, "Got nested line, our tool");
+is($events[1]->report->line, 2200, "Nested, but tool is not 'provided' so goes up to provided");
+is($events[2]->report->line, 3103, "Got nested line external tool");
+is($events[3]->report->line, 3104, "Got nested line legacy tool");
+is($events[4]->report->line, 3105, "Got nested line deeper legacy tool");
done_testing;
+
diff --git a/cpan/Test-Simple/t/TTLegacy/depth.t b/cpan/Test-Simple/t/TTLegacy/depth.t
index 90902be941..53ba7e0779 100644
--- a/cpan/Test-Simple/t/TTLegacy/depth.t
+++ b/cpan/Test-Simple/t/TTLegacy/depth.t
@@ -36,3 +36,4 @@ sub deeper
$test->is_num($results[1]->{depth}, 1, "depth 1");
$test->is_num($results[2]->{depth}, 2, "deeper");
}
+
diff --git a/cpan/Test-Simple/t/TTLegacy/run_test.t b/cpan/Test-Simple/t/TTLegacy/run_test.t
index e1bbfc5e1a..8288f19ab8 100644
--- a/cpan/Test-Simple/t/TTLegacy/run_test.t
+++ b/cpan/Test-Simple/t/TTLegacy/run_test.t
@@ -142,3 +142,4 @@ my $cap;
$test->is_eq($res_fail->{diag}, "multi fail diag\n", "run multi fail diag");
$test->is_num($res_pass->{depth}, 0, "run multi fail depth");
}
+
diff --git a/cpan/Test-Simple/t/pod-coverage.t b/cpan/Test-Simple/t/pod-coverage.t
deleted file mode 100644
index c68c3aaa24..0000000000
--- a/cpan/Test-Simple/t/pod-coverage.t
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/perl -w
-
-use Test::More;
-
-plan skip_all => "Who thought this test was a good idea?";
-
-# 1.08 added the coverage_class option.
-eval "use Test::Pod::Coverage 1.08";
-plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" if $@;
-eval "use Pod::Coverage::CountParents";
-plan skip_all => "Pod::Coverage::CountParents required for testing POD coverage" if $@;
-
-my @modules = grep { $_ !~ m/^Test::Tester(::.*)?$/ } Test::Pod::Coverage::all_modules();
-plan tests => scalar @modules;
-
-my %coverage_params = (
- "Test::Builder" => {
- also_private => [ '^(share|lock|BAILOUT)$' ]
- },
- "Test::More" => {
- trustme => [ '^(skip|todo)$' ]
- },
-);
-
-for my $module (@modules) {
- pod_coverage_ok( $module, { coverage_class => 'Pod::Coverage::CountParents',
- %{$coverage_params{$module} || {}} }
- );
-}
diff --git a/cpan/Test-Simple/t/ribasushi_diag.t b/cpan/Test-Simple/t/ribasushi_diag.t
index 35322fb001..23fa3d5384 100644
--- a/cpan/Test-Simple/t/ribasushi_diag.t
+++ b/cpan/Test-Simple/t/ribasushi_diag.t
@@ -27,7 +27,7 @@ BEGIN {
use SQL::Abstract::Test;
use Test::Tester2;
-my $results = intercept {
+my $events = intercept {
local $TODO = "Not today";
Worker::do_work(
@@ -42,13 +42,13 @@ my $results = intercept {
);
};
-results_are(
- $results,
+events_are(
+ $events,
ok => { in_todo => 1 },
diag => { in_todo => 1 },
note => { in_todo => 1 },
note => { in_todo => 1 },
- end => "All results are TODO"
+ end => "All events are TODO"
);
done_testing;
diff --git a/cpan/Test-Simple/t/versions.t b/cpan/Test-Simple/t/versions.t
index cad5cec8ce..c5a62a52b0 100644
--- a/cpan/Test-Simple/t/versions.t
+++ b/cpan/Test-Simple/t/versions.t
@@ -7,16 +7,19 @@
use strict;
use Test::More;
-require Test::Builder;
-require Test::Builder::Module;
-require Test::Simple;
-require Test::Builder::Tester;
-require Test::Tester2;
-require Test::Tester;
+{
+ local $SIG{__WARN__} = sub { 1 };
+ require Test::Builder;
+ require Test::Builder::Module;
+ require Test::Simple;
+ require Test::Builder::Tester;
+ require Test::Tester2;
+ require Test::Tester;
+}
my $dist_version = Test::More->VERSION;
-like( $dist_version, qr/^ \d+ \. \d+ $/x );
+like( $dist_version, qr/^ \d+ \. \d+ $/x, "Version number is sane" );
my @modules = qw(
Test::Simple