Do you mean something like this:
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 >>>>>>/ );
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.
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