MCPcopy Create free account
hub / github.com/ContentSquare/chproxy / TestSkipLeadingComments

Function TestSkipLeadingComments

utils_test.go:13–25  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

11)
12
13func TestSkipLeadingComments(t *testing.T) {
14 testSkipLeadingComments(t, "", "")
15 testSkipLeadingComments(t, "a", "a")
16 testSkipLeadingComments(t, "SELECT 1", "SELECT 1")
17 testSkipLeadingComments(t, "\t\n\v\f\r aaa ", "aaa ")
18 testSkipLeadingComments(t, "\t /** foo /* */ bar ", "bar ")
19 testSkipLeadingComments(t, "/* foo *//* bar */\t\t/* baz */aaa", "aaa")
20 testSkipLeadingComments(t, " /* sdfsd * dfds / sdf", "")
21 testSkipLeadingComments(t, " -- sdsfd - -- -", "")
22 testSkipLeadingComments(t, "\t - sss", "- sss")
23 testSkipLeadingComments(t, " -- ss\n xdf", "xdf")
24 testSkipLeadingComments(t, " --\n /**/-- /* ssd \n/* xdfd */ qqw ", "qqw ")
25}
26
27func testSkipLeadingComments(t *testing.T, q, expectedQ string) {
28 t.Helper()

Callers

nothing calls this directly

Calls 1

testSkipLeadingCommentsFunction · 0.85

Tested by

no test coverage detected