Skip to content

Commit cf0b3c7

Browse files
committed
Tests: Add SQL statement with inline comment
SELECT /* this is a comment */ 3;
1 parent ed39076 commit cf0b3c7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_commands.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,17 @@ def test_sql_comments(self):
228228
SELECT 1;
229229
-- Another SELECT statement.
230230
SELECT 2;
231+
-- Yet another SELECT statement with an inline comment.
232+
-- Other than the regular comments, it gets passed through to the database server.
233+
SELECT /* this is a comment */ 3;
231234
"""
232235
cmd = CrateShell()
233236
cmd._exec_and_print = MagicMock()
234237
cmd.process_iterable(sql.splitlines())
235238
cmd._exec_and_print.assert_has_calls([
236239
call("SELECT 1"),
237240
call("SELECT 2"),
241+
call("SELECT /* this is a comment */ 3"),
238242
])
239243

240244
def test_js_comments(self):

0 commit comments

Comments
 (0)