Stop autodie test from changing a file to stop Git whining about uncommitted changes
authorSteve Hay <steve.m.hay@googlemail.com>
Thu, 5 Sep 2013 17:11:07 +0000 (18:11 +0100)
committerSteve Hay <steve.m.hay@googlemail.com>
Thu, 5 Sep 2013 17:11:07 +0000 (18:11 +0100)
The patch has been sent upstream as CPAN#88444.

Porting/Maintainers.pl
cpan/autodie/t/utime.t
t/porting/customized.dat

index 3d2ba8d..fe6fa4b 100755 (executable)
@@ -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',
     },
 
index 983ca9c..d52764a 100644 (file)
@@ -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);
index 9574846..1d46a76 100644 (file)
@@ -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