Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestRedefineAfterNamedExecution (0.36 sec)

  1. src/html/template/template_test.go

    	c.mustParse(c.root, `{{if .}}<{{template "X"}}>{{end}}{{define "X"}}foo{{end}}`)
    	c.mustExecute(c.root, 0, "")
    	c.mustNotParse(c.root, `{{define "X"}}bar{{end}}`)
    	c.mustExecute(c.root, 1, "&lt;foo>")
    }
    
    func TestRedefineAfterNamedExecution(t *testing.T) {
    	c := newTestCase(t)
    	c.mustParse(c.root, `<{{template "X" .}}>{{define "X"}}foo{{end}}`)
    	c.mustExecute(c.root, nil, "&lt;foo>")
    	c.mustNotParse(c.root, `{{define "X"}}bar{{end}}`)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:48:16 UTC 2022
    - 6.2K bytes
    - Viewed (0)
Back to top