However this method could easily lead to very involved tests for complicated pages - and testing the test code could become trickier than testing the template.Template: blah blah [% user.name %] blah, blah. Test data: $$vars{user}{name} = "<<<<<< user.name >>>>>>" Template produces: blah blah <<<<<< user.name >>>>>> blah, blah. Testing code: ok( $output =~ m/<<<<<< user.name >>>>>>/ );
Also if I have understood you correctly it will make it difficult to test real world data. As I see it the only really good way to test the templates is to create simplified ones and then to check the output against known good results - even if that is more labour intensive.
--tidiness is the memory loss of environmental mnemonics
In reply to Re: •Re: Testing Template, or should I write a diff for TT templates?
by EvdB
in thread Testing Template, or should I write a diff for TT templates?
by EvdB
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |