diff options
Diffstat (limited to 'src/html/template/exec_test.go')
| -rw-r--r-- | src/html/template/exec_test.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/html/template/exec_test.go b/src/html/template/exec_test.go index 05302156e0..f60308e679 100644 --- a/src/html/template/exec_test.go +++ b/src/html/template/exec_test.go @@ -561,6 +561,8 @@ var execTests = []execTest{ {"with $x struct.U.V", "{{with $x := $}}{{$x.U.V}}{{end}}", "v", tVal, true}, {"with variable and action", "{{with $x := $}}{{$y := $.U.V}}{{$y}}{{end}}", "v", tVal, true}, {"with on typed nil interface value", "{{with .NonEmptyInterfaceTypedNil}}TRUE{{ end }}", "", tVal, true}, + {"with else with", "{{with 0}}{{.}}{{else with true}}{{.}}{{end}}", "true", tVal, true}, + {"with else with chain", "{{with 0}}{{.}}{{else with false}}{{.}}{{else with `notempty`}}{{.}}{{end}}", "notempty", tVal, true}, // Range. {"range []int", "{{range .SI}}-{{.}}-{{end}}", "-3--4--5-", tVal, true}, |
