Skip to content

Commit d6224c1

Browse files
hkaltaiclaude
andcommitted
test: ClickHouse heredocs mask statement delimiters
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent c391f17 commit d6224c1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎packages/opencode/test/altimate/tools/sql-read-safety.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ describe("read-only SQL parser boundary", () => {
124124
["duckdb", "SELECT $x$ a; b $x$"],
125125
["duckdb", "SELECT $$ ; DROP TABLE t $$"],
126126
["snowflake", "SELECT $$ ; DROP TABLE t $$"],
127+
["clickhouse", "SELECT $x$ a; b $x$"],
128+
["clickhouse", "SELECT $$ ; DROP TABLE t $$"],
129+
// The closing tag must be the opening one: $y$ inside $x$...$x$ does not end it.
130+
["clickhouse", "SELECT $x$ a $y$; DELETE FROM t; $x$"],
127131
]) {
128132
test(`dollar literals mask statement delimiters for ${dialect}: ${sql}`, () => {
129133
const { tokens, complete } = tokenizeSql(sql, dialect)

0 commit comments

Comments
 (0)