Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
merged in the v0.11.1 release (#1050)
Browse files Browse the repository at this point in the history
* fixed templateRenderer to work with plush 4.5.7 (#1049)

* fixed templateRenderer to work with plush 4.5.7

* added a test

* fixed appveyor to run tests

* version bump

* Updated SHOULDERS.md

* Restore & adapt Test_Template_Partial_Recursive_With_Global_And_Local_Context
  • Loading branch information
markbates authored and stanislas-m committed May 12, 2018
1 parent 6e80100 commit 6825fa5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions render/partials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,23 @@ func Test_Template_Partial_Form(t *testing.T) {
r.NoError(err)

}

func Test_Template_Partial_Recursive_With_Global_And_Local_Context(t *testing.T) {
r := require.New(t)

const indexHTML = `<%= partial("foo.html", {other: "Other"}) %>`
const fooHTML = `<%= other %>|<%= name %>`
const result = `Other|Mark`

err := withHTMLFile("index.html", indexHTML, func(e *Engine) {
err := withHTMLFile("_foo.html", fooHTML, func(e *Engine) {
re := e.Template("", "index.html")
bb := &bytes.Buffer{}
err := re.Render(bb, Data{"name": "Mark"})
r.NoError(errors.Cause(err))
r.Equal(result, strings.TrimSpace(bb.String()))
})
r.NoError(err)
})
r.NoError(err)
}

0 comments on commit 6825fa5

Please sign in to comment.