Only run actual query without any comments

This commit is contained in:
Dan Sosedoff
2016-02-18 22:18:07 -06:00
parent 540613645f
commit 6edc384c05
3 changed files with 25 additions and 5 deletions

View File

@@ -17,3 +17,9 @@ func Test_desanitize64(t *testing.T) {
assert.Equal(t, expected, desanitize64(example))
}
}
func Test_cleanQuery(t *testing.T) {
assert.Equal(t, "a\nb\nc", cleanQuery("a\nb\nc"))
assert.Equal(t, "", cleanQuery("--something"))
assert.Equal(t, "test", cleanQuery("--test\ntest\n -- test\n"))
}