mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-23 21:53:09 +02:00
Pull in latest Go template source
This commit is contained in:
@@ -1699,3 +1699,16 @@ func TestIssue31810(t *testing.T) {
|
||||
t.Errorf("%s got %q, expected %q", textCall, b.String(), "result")
|
||||
}
|
||||
}
|
||||
|
||||
// Issue 43065, range over send only channel
|
||||
func TestIssue43065(t *testing.T) {
|
||||
var b bytes.Buffer
|
||||
tmp := Must(New("").Parse(`{{range .}}{{end}}`))
|
||||
ch := make(chan<- int)
|
||||
err := tmp.Execute(&b, ch)
|
||||
if err == nil {
|
||||
t.Error("expected err got nil")
|
||||
} else if !strings.Contains(err.Error(), "range over send-only channel") {
|
||||
t.Errorf("%s", err)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user