From b1bce069b4ed334af4a5deff48e1ae811ca49864 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Tue, 3 Apr 2018 12:25:56 +0200 Subject: [PATCH] Show errors from tests run via do Two of the test scripts run t/input_output.t using do. That test script may fail with an exception, so the do calls should check for this and rethrow the error. Ensure t/input_output.t returns a true value so the check can be reliable. Fixes #206 --- Changes | 4 ++++ t/input_output.t | 2 ++ t/input_output_no_PU_UU.t | 2 +- t/input_output_no_UU.t | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index a59982f..2bfe705 100644 --- a/Changes +++ b/Changes @@ -13,6 +13,10 @@ Revision history for Path-Tiny allows detecting and warning, for example, with the Luster filesystem on Linux. + [Tests] + + - Improve reliability and diagnostics of tests run via 'do'. + 0.104 2017-02-17 07:17:00-05:00 America/New_York - No changes from 0.103-TRIAL. diff --git a/t/input_output.t b/t/input_output.t index d141931..5c61bb7 100644 --- a/t/input_output.t +++ b/t/input_output.t @@ -552,4 +552,6 @@ subtest "edit_lines" => sub { }; done_testing; + +1; # COPYRIGHT diff --git a/t/input_output_no_PU_UU.t b/t/input_output_no_PU_UU.t index 4ff64e5..14bf92c 100644 --- a/t/input_output_no_PU_UU.t +++ b/t/input_output_no_PU_UU.t @@ -11,6 +11,6 @@ use lib map { note "Hiding Unicode::UTF8 and PerlIO::utf8_strict"; -do "./t/input_output.t"; +do "./t/input_output.t" or die $@ || $!; # COPYRIGHT diff --git a/t/input_output_no_UU.t b/t/input_output_no_UU.t index 091c5ca..c81c9bb 100644 --- a/t/input_output_no_UU.t +++ b/t/input_output_no_UU.t @@ -12,6 +12,6 @@ use lib map { note "Hiding Unicode::UTF8"; -do "./t/input_output.t"; +do "./t/input_output.t" or die $@ || $!; # COPYRIGHT