MCPcopy Index your code
hub / github.com/rubenv/sql-migrate / TestSemicolons

Method TestSemicolons

sqlparse/sqlparse_test.go:17–54  ·  view source on GitHub ↗
(c *C)

Source from the content-addressed store, hash-verified

15var _ = Suite(&SqlParseSuite{})
16
17func (*SqlParseSuite) TestSemicolons(c *C) {
18 type testData struct {
19 line string
20 result bool
21 }
22
23 tests := []testData{
24 {
25 line: "END;",
26 result: true,
27 },
28 {
29 line: "END; -- comment",
30 result: true,
31 },
32 {
33 line: "END ; -- comment",
34 result: true,
35 },
36 {
37 line: "END -- comment",
38 result: false,
39 },
40 {
41 line: "END -- comment ;",
42 result: false,
43 },
44 {
45 line: "END \" ; \" -- comment",
46 result: false,
47 },
48 }
49
50 for _, test := range tests {
51 r := endsWithSemicolon(test.line)
52 c.Assert(r, Equals, test.result)
53 }
54}
55
56func (*SqlParseSuite) TestSplitStatements(c *C) {
57 type testData struct {

Callers

nothing calls this directly

Calls 1

endsWithSemicolonFunction · 0.85

Tested by

no test coverage detected