MCPcopy Index your code
hub / github.com/valyala/quicktemplate / TestScannerCommentSuccess

Function TestScannerCommentSuccess

parser/scanner_test.go:215–230  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

213}
214
215func 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
232func TestScannerCommentFailure(t *testing.T) {
233 testScannerFailure(t, "{%comment%}...no endcomment")

Callers

nothing calls this directly

Calls 1

testScannerSuccessFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…