[Templates] FW: t/date.t fails in Template::Toolkit
Robin Barker
Robin.Barker@npl.co.uk
Wed, 8 Oct 2003 10:52:48 +0100
-----Original Message-----
From: Robin Barker
Sent: 24 September 2003 18:51
To: 'Andy Wardley'
Subject: t/date.t fails in Template::Toolkit
t/date.t fails for me in Template-Toolkit-2.10
ok 24 - template text 11 processed OK: [% USE day = date(format =>
'%A'...
Argument "%s" isn't numeric in localtime at t/date.t line 66, <DATA>
line 1.
MATCH FAILED
input: [[% USE day = date(format => '%A', locale => 'en_GB') %]\n[%
day.format('4:20:00 9-13-2000') %]\n]
expect: [Thursday]
output: [Tuesday]
FAILED 25: - template text 11 did not match expected
not ok 25 - template text 11 did not match expected
I have a patch, but I don't know if it captures the test objective.
Robin
diff -u ../Template-Toolkit-2.10-orig/t/date.t t
--- ../Template-Toolkit-2.10-orig/t/date.t Wed Apr 30 11:39:34 2003
+++ t/date.t Wed Sep 24 18:44:14 2003
@@ -191,8 +191,8 @@
-- expect --
-- process --
-[% USE date(time='4:20:00 9-13-2000', format='%s');
- nowloc(date.format, '%A', 'en_GB')
+[% USE date(time='4:20:00 9-13-2000', format='%A');
+ now(date.format, '%A', 'en_GB')
%]
-- test --
-------------------------------------------------------------------
This e-mail and any attachments may contain confidential and/or
privileged material; it is for the intended addressee(s) only.
If you are not a named addressee, you must not use, retain or
disclose such information.
NPL Management Ltd cannot guarantee that the e-mail or any
attachments are free from viruses.
NPL Management Ltd. Registered in England and Wales. No: 2937881
Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW.
-------------------------------------------------------------------