]> Cypherpunks repositories - gostls13.git/commitdiff
exp/template/html: add some tests for ">" attributes.
authorNigel Tao <nigeltao@golang.org>
Thu, 25 Aug 2011 03:48:21 +0000 (13:48 +1000)
committerNigel Tao <nigeltao@golang.org>
Thu, 25 Aug 2011 03:48:21 +0000 (13:48 +1000)
R=mikesamuel
CC=golang-dev
https://golang.org/cl/4956042

src/pkg/exp/template/html/escape_test.go

index ee36da22577b767f0c5a06c0ace9159c840db7ac..6bab507874026e2ca019689c70be88a9137a25fd 100644 (file)
@@ -292,6 +292,18 @@ func TestEscapeText(t *testing.T) {
                        `<a href="'`,
                        context{state: stateURL, delim: delimDoubleQuote},
                },
+               {
+                       `<img alt="1">`,
+                       context{state: stateText},
+               },
+               {
+                       `<img alt="1>"`,
+                       context{state: stateTag},
+               },
+               {
+                       `<img alt="1>">`,
+                       context{state: stateText},
+               },
                {
                        `<input checked type="checkbox"`,
                        context{state: stateTag},