Skip to content

Commit

Permalink
tests: add more tests for fet
Browse files Browse the repository at this point in the history
  • Loading branch information
fefit committed Oct 24, 2021
1 parent d14f565 commit bedf4de
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignore:
- types/types.go
- lib/generator/generator.go
2 changes: 2 additions & 0 deletions fet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,7 @@ func TestCompile(t *testing.T) {
"Footer": "fet",
}, "header:hello;footer:fet")
assertOutputToBe(t, "include_props.tpl", nil, "header:hello;footer:fet")
assertOutputToBe(t, "extends.tpl", nil, "(header)\n(content)\n(footer)")
assertOutputToBe(t, "extends_override.tpl", nil, "(override:header)\n(content)\n(footer)")
})
}
1 change: 1 addition & 0 deletions tests/smarty/templates/extends.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{%extends file="inc/base.tpl"%}
2 changes: 2 additions & 0 deletions tests/smarty/templates/extends_override.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{%extends "inc/base.tpl"%}
{%block name="header"%}(override:header){%/block%}
3 changes: 3 additions & 0 deletions tests/smarty/templates/inc/base.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{%block "header"%}(header){%/block%}
{%block "content"%}(content){%/block%}
{%block "footer"%}(footer){%/block%}

0 comments on commit bedf4de

Please sign in to comment.