From a1a6b6b3044782a2079b680cd42f12ae08fc53e2 Mon Sep 17 00:00:00 2001 From: Steve Hay Date: Thu, 5 Sep 2013 18:11:07 +0100 Subject: [PATCH] Stop autodie test from changing a file to stop Git whining about uncommitted changes The patch has been sent upstream as CPAN#88444. --- Porting/Maintainers.pl | 9 ++++++--- cpan/autodie/t/utime.t | 6 ++++++ t/porting/customized.dat | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 3d2ba8d..fe6fa4b 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -248,9 +248,12 @@ use File::Glob qw(:case); t/system.t ) ], - # Test got broken by Carp change; update to be merged upstream - # [rt.cpan.org #88076]. - 'CUSTOMIZED' => ['t/backcompat.t'], + 'CUSTOMIZED' => [ + # Waiting to be merged upstream: see CPAN RT#88076 + qw( t/backcompat.t ), + # Waiting to be merged upstream: see CPAN RT#88444 + qw( t/utime.t ), + ], 'UPSTREAM' => 'cpan', }, diff --git a/cpan/autodie/t/utime.t b/cpan/autodie/t/utime.t index 983ca9c..d52764a 100644 --- a/cpan/autodie/t/utime.t +++ b/cpan/autodie/t/utime.t @@ -10,9 +10,15 @@ use autodie; eval { utime(undef, undef, NO_SUCH_FILE); }; isa_ok($@, 'autodie::exception', 'exception thrown for utime'); +my($atime, $mtime) = (stat TOUCH_ME)[8, 9]; + eval { utime(undef, undef, TOUCH_ME); }; ok(! $@, "We can utime a file just fine.") or diag $@; eval { utime(undef, undef, NO_SUCH_FILE, TOUCH_ME); }; isa_ok($@, 'autodie::exception', 'utime exception on single failure.'); is($@->return, 1, "utime fails correctly on a 'true' failure."); + +# Reset timestamps so that Git doesn't think the file has changed when +# running the test in the core perl distribution. +utime($atime, $mtime, TOUCH_ME); diff --git a/t/porting/customized.dat b/t/porting/customized.dat index 9574846..1d46a76 100644 --- a/t/porting/customized.dat +++ b/t/porting/customized.dat @@ -16,6 +16,7 @@ Text::Balanced cpan/Text-Balanced/t/09_gentag.t 42361b5dfb3bb728bce20f4fb0d92ccf Text::ParseWords cpan/Text-ParseWords/t/ParseWords.t 9bae51c9b944cd5c0bbabe9d397e573976a2be8e Text::ParseWords cpan/Text-ParseWords/t/taint.t 3cff0dae812801f7aa1738d6070508f2c5bcc2e5 autodie cpan/autodie/t/backcompat.t c6d500af89a229d6827f7e3bd4f9355329e9415b +autodie cpan/autodie/t/utime.t e2491f81cddc128097ffa1aa91b86db993116286 libnet cpan/libnet/Makefile.PL 6b10ac98e672bfebb8f49b9720a93442645208b3 podlators cpan/podlators/scripts/pod2man.PL f81acf53f3ff46cdcc5ebdd661c5d13eb35d20d6 podlators cpan/podlators/scripts/pod2text.PL b4693fcfe4a0a1b38a215cfb8985a65d5d025d69 -- 2.7.4