[Templates] DBI test bug(?) with 2.08 and Pg 7.2.1

jjhelm@att.net jjhelm@att.net
Wed, 04 Sep 2002 00:44:55 +0000


Don't know if anyone else has noticed this - I did look
in the past 2 months of the list archive but didn't see
it mentioned.

Anyway, here's the problem - the dbi test fails when
connecting to a PG 7.2.1 test database.
============================================
ok 18 - template text 8 processed OK: [% USE dbi -%]\n[%
dbi.connect(sh...
MATCH FAILED
 input: [[% USE dbi -%]
[% dbi.connect(short, user, pass) -%]
[% FOREACH user = dbi.query("SELECT name FROM usr WHERE
id='abw'") -%]
* [% user.name %]
[% END %]
]
expect: [* Andy Wardley]
output: [* Andy Wardley                    ]
FAILED 19:  - template text 8 did not match expected
not ok 19 - template text 8 did not match expected
============================================

The fix is just to add ChopBlanks to the connect call on
that test.  It's used on most of the other connect calls,
but not this one - I assume it was just a simple
oversight, and on most databases, not a problem - but
since they made ChopBlanks not the default anymore on PG,
it fails.

Forgive me if this comes thru jumbled up - blame
Worldnet's web mail interface - line 263 is the offender
in the dbi.t file.
============================================
--- dbi.t.orig  Tue Sep  3 17:37:59 2002
+++ dbi.t       Tue Sep  3 17:38:23 2002
@@ -263,7 +263,7 @@
 
 -- test --
 [% USE dbi -%]
-[% dbi.connect(short, user, pass) -%]
+[% dbi.connect(short, user, pass ChopBlanks=1) -%]
 [% FOREACH user = dbi.query("SELECT name FROM usr WHERE
id='abw'") -%]
 * [% user.name %]
 [% END %]
============================================

Thanks

Jim

p.s. I'm new to TT - hope I find it as useful as everyone
else seems to.