File: 735051-fix-FTBFS.patch

package info (click to toggle)
libhtml-formhandler-perl 0.40013-1%2Bdeb7u1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,136 kB
  • sloc: perl: 8,102; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 1,142 bytes parent folder | download
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: Fix test case which was dependent on a 2008+5 years time span
Origin: upstream, https://github.com/gshank/html-formhandler/commit/555f460645d6fd52c5fd8fd386d0dc4bf6f5daa6
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=91793
Bug-Debian: http://bugs.debian.org/735051
Forwarded: not-needed
Reviewed-by: Salvatore Bonaccorso <carnil@debian.org>
Last-Update: 2014-01-30
Applied-Upstream: 0.40055

--- a/t/compound/basic.t
+++ b/t/compound/basic.t
@@ -73,11 +73,12 @@
 
 my $dtform = Form::Start->new;
 ok( $dtform, 'datetime form' );
+my $year = (localtime)[5] + 1900;
 $params = { name => 'DT_testing', 'start_date.month' => '10',
-    'start_date.day' => '2', 'start_date.year' => '2008' };
+    'start_date.day' => '2', 'start_date.year' => $year };
 $dtform->process( params => $params );
 ok( $dtform->validated, 'form validated' );
-is( $dtform->field('start_date')->value->mdy, '10-02-2008', 'datetime value');
+is( $dtform->field('start_date')->value->mdy, "10-02-$year", 'datetime value');
 $params->{'start_date.month'} = 8;
 $dtform->process( params => $params );
 ok( !$dtform->validated, 'form did not validate' );