diff options
Diffstat (limited to 'src/pkg/template/template_test.go')
-rw-r--r-- | src/pkg/template/template_test.go | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/pkg/template/template_test.go b/src/pkg/template/template_test.go index a5e6a4ecc..99b23c288 100644 --- a/src/pkg/template/template_test.go +++ b/src/pkg/template/template_test.go @@ -144,21 +144,21 @@ var tests = []*Test{ }, &Test{ - in: `{"Strings" ":"} {""} {"\t\u0123 \x23\\"} {"\"}{\\"}`, + in: `{"Strings" ":"} {""} {"|"} {"\t\u0123 \x23\\"} {"\"}{\\"}`, - out: "Strings: \t\u0123 \x23\\ \"}{\\", + out: "Strings: | \t\u0123 \x23\\ \"}{\\", }, &Test{ - in: "{`Raw strings` `:`} {``} {`\\t\\u0123 \\x23\\`} {`}{\\`}", + in: "{`Raw strings` `:`} {``} {`|`} {`\\t\\u0123 \\x23\\`} {`}{\\`}", - out: "Raw strings: \\t\\u0123 \\x23\\ }{\\", + out: "Raw strings: | \\t\\u0123 \\x23\\ }{\\", }, &Test{ - in: "Characters: {'a'} {'\\u0123'} {' '} {'}'} {'{'}", + in: "Characters: {'a'} {'\\u0123'} {' '} {'{'} {'|'} {'}'}", - out: "Characters: 97 291 32 125 123", + out: "Characters: 97 291 32 123 124 125", }, &Test{ @@ -762,6 +762,10 @@ var formatterTests = []Test{ in: `{"%.02f 0x%02X" 1.1 10|printf}`, out: "1.10 0x0A", }, + { + in: `{""|}{""||}{""|printf}`, // Issue #1896. + out: "", + }, } func TestFormatters(t *testing.T) { |