File: use_test-mocktime.patch

package info (click to toggle)
libhttp-cookiejar-perl 0.006-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 252 kB
  • sloc: perl: 435; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 646 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Description: Time::Mock is not packaged, Test::MockTime is and seems to work as well ...
Origin: vendor
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2014-03-02

--- a/t/sort.t
+++ b/t/sort.t
@@ -3,7 +3,7 @@
 use warnings;
 use Test::More 0.96;
 use Test::Deep '!blessed';
-use Time::Mock;
+use Test::MockTime;
 
 use HTTP::CookieJar;
 
@@ -32,7 +32,7 @@
     my $jar    = HTTP::CookieJar->new;
     my $offset = 0;
     for my $cookie ( @{ $c->{cookies} } ) {
-        Time::Mock->offset($offset);
+        Test::MockTime::set_relative_time($offset);
         $jar->add(@$cookie);
         $offset += 10;
     }