Skip to content

Commit 1822a13

Browse files
authored
test: test embedded comment in comment (#1919)
1 parent fd0b845 commit 1822a13

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementParserTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ public void testRemoveComments() {
154154
+ "line\n"
155155
+ "comment\n"
156156
+ "*/SELECT \"FOO\nBAR\" FROM \"BAR\" WHERE name='test\ntest' and id=1"));
157+
assertEquals(
158+
"SELECT 1",
159+
parser.removeCommentsAndTrim(
160+
"/* This block comment surrounds a query which itself has a block comment...\n"
161+
+ "SELECT /* embedded single line */ 'embedded' AS x2;\n"
162+
+ "*/\n"
163+
+ "SELECT 1"));
157164
}
158165
}
159166

0 commit comments

Comments
 (0)