summaryrefslogtreecommitdiff
path: root/textproc/p5-podlators/files/patch-t_devise-date.t
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2015-04-09 12:21:29 +0000
committerMathieu Arnold <mat@FreeBSD.org>2015-04-09 12:21:29 +0000
commitbfee655ccfd4b4ce770d4aca8a31f44df7d52229 (patch)
tree13588e47865d92c5a884f61a462b25fb3c56bb9f /textproc/p5-podlators/files/patch-t_devise-date.t
parentupdate to 0.2.6.7 (diff)
Make Perl build more reproducibly.
Differential Revision: https://reviews.freebsd.org/D2016 Some bits from: Jérémy Bobbio <lunar@debian.org> Sponsored by: Absolight
Notes
Notes: svn path=/head/; revision=383641
Diffstat (limited to 'textproc/p5-podlators/files/patch-t_devise-date.t')
-rw-r--r--textproc/p5-podlators/files/patch-t_devise-date.t39
1 files changed, 39 insertions, 0 deletions
diff --git a/textproc/p5-podlators/files/patch-t_devise-date.t b/textproc/p5-podlators/files/patch-t_devise-date.t
new file mode 100644
index 000000000000..fb9024a309d4
--- /dev/null
+++ b/textproc/p5-podlators/files/patch-t_devise-date.t
@@ -0,0 +1,39 @@
+--- t/devise-date.t.orig 2013-10-06 06:09:56 UTC
++++ t/devise-date.t
+@@ -1,15 +1,28 @@
+-#!/usr/bin/perl -w
+-
+-# In order for MakeMaker to build in the core, nothing can use
+-# Fcntl which includes POSIX. devise_date()'s use of strftime()
+-# was replaced. This tests that it's identical.
++#!/usr/bin/perl
++#
++# In order for MakeMaker to build in the core, nothing can use Fcntl which
++# includes POSIX. devise_date()'s use of strftime() was replaced. This tests
++# that it's identical. It also tests special handling of the POD_MAN_DATE
++# environment variable.
+
++use 5.006;
+ use strict;
+-
+-use Test::More tests => 1;
++use warnings;
+
+ use Pod::Man;
+ use POSIX qw(strftime);
+
++use Test::More tests => 2;
++
++# Check that the results of device_date matches strftime. There is no input
++# file name, so this will use the current time.
+ my $parser = Pod::Man->new;
+-is $parser->devise_date, strftime("%Y-%m-%d", localtime);
++is(
++ $parser->devise_date,
++ strftime('%Y-%m-%d', localtime()),
++ 'devise_date matches strftime'
++);
++
++# Set the override environment variable and ensure that it's honored.
++local $ENV{POD_MAN_DATE} = '2014-01-01';
++is($parser->devise_date, '2014-01-01', 'devise_date honors POD_MAN_DATE');