input: Write tests on templates

Close #773