improved test using templates files to check if the generated file is OK