(t *testing.T)
| 11 | ) |
| 12 | |
| 13 | func 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 | |
| 27 | func testSkipLeadingComments(t *testing.T, q, expectedQ string) { |
| 28 | t.Helper() |
nothing calls this directly
no test coverage detected