diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-06-03 11:31:24 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-06-03 11:38:02 +0200 |
commit | 13f4fcd5bf09c70942b6c85a2b919ffa1ca0c6a8 (patch) | |
tree | 717e1ceeef3a60af29e7897c7629d1502b797838 /src/pkg/template/template_test.go | |
parent | 6bf52070ef1028f7fcc98fad1e73795a7efd7ce7 (diff) | |
download | golang-13f4fcd5bf09c70942b6c85a2b919ffa1ca0c6a8.tar.gz |
Imported Upstream version 2011.06.02
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) { |