summaryrefslogtreecommitdiff
path: root/t/op/time.t
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2008-09-29 12:07:29 -0400
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-01-03 18:38:49 +0100
commit4c91ace1ab7f54d4e52467ee37e480e29b555047 (patch)
treedc36757714ec56e3a192ca05a09ec377c669e03d /t/op/time.t
parentdc164757d6434bcc04e6bf2256aab2dea31afaa0 (diff)
downloadperl-4c91ace1ab7f54d4e52467ee37e480e29b555047.tar.gz
Everything should now work with negative times, so let's pull out all the skips from the tests.
Diffstat (limited to 't/op/time.t')
-rwxr-xr-xt/op/time.t11
1 files changed, 7 insertions, 4 deletions
diff --git a/t/op/time.t b/t/op/time.t
index a67dead9b1..2b9be51fd0 100755
--- a/t/op/time.t
+++ b/t/op/time.t
@@ -6,7 +6,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 32;
+plan tests => 34;
($beguser,$begsys) = times;
@@ -110,15 +110,18 @@ ok(gmtime() =~ /^(Sun|Mon|Tue|Wed|Thu|Fri|Sat)[ ]
# the same regardless of the time zone.
my %tests = (
# time_t month, year, scalar
- 5000000000 => [5, 228, qr/Jun \d+ .* 2128$/],
- 1163500000 => [10, 106, qr/Nov \d+ .* 2006$/],
+ -8589934592 => [9, -203, qr/Oct \d+ .* 1697$/],
+ 5000000000 => [5, 228, qr/Jun \d+ .* 2128$/],
+ 1163500000 => [10, 106, qr/Nov \d+ .* 2006$/],
);
for my $time (keys %tests) {
my @expected = @{$tests{$time}};
my $scalar = pop @expected;
- ok eq_array([(localtime($time))[4,5]], \@expected), "localtime($time) list context";
+ my @time = (localtime($time))[4,5];
+ ok( eq_array(\@time, \@expected), "localtime($time) list context" )
+ or diag("@time");
like scalar localtime($time), $scalar, " scalar";
}
}