(t *testing.T)
| 86 | } |
| 87 | |
| 88 | func TestUsefulErrorOnLateImportOrExtends(t *testing.T) { |
| 89 | p := ParserTestCase{T: t} |
| 90 | p.ExpectError("late_import.jet", `<html><head>{{import "./foo.jet"}}</head></html>`, "template: late_import.jet:1: parsing command: unexpected keyword 'import' ('import' statements must be at the beginning of the template)") |
| 91 | p.ExpectError("late_extends.jet", `<html><head>{{extends "./foo.jet"}}</head></html>`, "template: late_extends.jet:1: parsing command: unexpected keyword 'extends' ('extends' statements must be at the beginning of the template)") |
| 92 | } |
| 93 | |
| 94 | func TestKeywordsDisallowedAsBlockNames(t *testing.T) { |
| 95 | p := ParserTestCase{T: t} |
nothing calls this directly
no test coverage detected
searching dependent graphs…