(t *testing.T)
| 213 | } |
| 214 | |
| 215 | func TestScannerCommentSuccess(t *testing.T) { |
| 216 | testScannerSuccess(t, "{%comment%}{%endcomment%}", nil) |
| 217 | testScannerSuccess(t, "{%comment%}foo{%endcomment%}", nil) |
| 218 | testScannerSuccess(t, "{%comment%}foo{%endcomment%}{%comment%}sss{%endcomment%}", nil) |
| 219 | testScannerSuccess(t, "{%comment%}foo{%bar%}{%endcomment%}", nil) |
| 220 | testScannerSuccess(t, "{%comment%}foo{%bar {%endcomment%}", nil) |
| 221 | testScannerSuccess(t, "{%comment%}foo{%bar&^{%endcomment%}", nil) |
| 222 | testScannerSuccess(t, "{%comment%}foo{% bar\n\rs%{%endcomment%}", nil) |
| 223 | testScannerSuccess(t, "xx{%x%}www{% comment aux data %}aaa{% comment %}{% endcomment %}yy", []tt{ |
| 224 | {ID: text, Value: "xx"}, |
| 225 | {ID: tagName, Value: "x"}, |
| 226 | {ID: tagContents, Value: ""}, |
| 227 | {ID: text, Value: "www"}, |
| 228 | {ID: text, Value: "yy"}, |
| 229 | }) |
| 230 | } |
| 231 | |
| 232 | func TestScannerCommentFailure(t *testing.T) { |
| 233 | testScannerFailure(t, "{%comment%}...no endcomment") |
nothing calls this directly
no test coverage detected
searching dependent graphs…