Re: [htmltmpl] Testing HTML::Template templates
Brought to you by:
samtregar
From: Justin S. <ju...@sk...> - 2006-09-12 05:30:25
|
On Sep 11, 2006, at 3:51 AM, Gabor Szabo wrote: > that's good, are you also aware of the perl-qa mailing list? I had a hunch there'd be a Kult of Kwality Assurancers for Perl :) > Why not test the result, after processing using HTML::Template? > That's what is really important. The problem with testing them after they're parsed is that, depending on the return values of any and every <tmpl_if> and friends block, the return'd HTML would be different. I'm thinking that most every HTML::Template template is actually valid HTML structurally, even with the block statements and thus can be tested for valid structure. HTML::Lint at least barfs on the embedded comments inside HTML tags. That, of itself may not be valid HTML, in which case I've gotten a dead end. Justin Simoni -- :: is an eccentric artist, living and working in Denver, Colorado :: URL: http://justinsimoni.com :: Mailing List - http://justinsimoni.com/mailing_list.html On Sep 11, 2006, at 3:51 AM, Gabor Szabo wrote: > On 9/11/06, Justin Simoni <ju...@sk...> wrote: >> Heya, >> >> I've thus caught the Test::More and Co bug and find myself wanting to >> add tests to almost every part of my proggy. > > that's good, are you also aware of the perl-qa mailing list? > >> html_ok($html, "We're good."); > > I am not sure why do you want your templates to be Lint-able? > It might be "nice" but it does not seem to add business value. > > Why not test the result, after processing using HTML::Template? > That's what is really important. > > Gabor > > |