diff options
Diffstat (limited to 'lang/perl5-devel/files/patch-cpan_podlators_t_devise-date.t')
| -rw-r--r-- | lang/perl5-devel/files/patch-cpan_podlators_t_devise-date.t | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lang/perl5-devel/files/patch-cpan_podlators_t_devise-date.t b/lang/perl5-devel/files/patch-cpan_podlators_t_devise-date.t new file mode 100644 index 000000000000..3023a2a5b49e --- /dev/null +++ b/lang/perl5-devel/files/patch-cpan_podlators_t_devise-date.t @@ -0,0 +1,39 @@ +--- cpan/podlators/t/devise-date.t.orig 2015-04-15 07:47:18 UTC ++++ cpan/podlators/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'); |
