mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Add tests.
This commit is contained in:
parent
0cac4b4a6e
commit
ed90a0fc1c
7
tests/queries/0_stateless/02192_comment.reference
Normal file
7
tests/queries/0_stateless/02192_comment.reference
Normal file
@ -0,0 +1,7 @@
|
||||
1
|
||||
2
|
||||
3
|
||||
1
|
||||
1
|
||||
1
|
||||
\n# hello 1
|
16
tests/queries/0_stateless/02192_comment.sql
Normal file
16
tests/queries/0_stateless/02192_comment.sql
Normal file
@ -0,0 +1,16 @@
|
||||
# comment
|
||||
#! comment2
|
||||
select 1;
|
||||
# comment3
|
||||
#! comment4
|
||||
select 2; # another one comemnt
|
||||
#
|
||||
#!
|
||||
select 3;
|
||||
|
||||
select 1; #!
|
||||
SELECT # hello
|
||||
1;
|
||||
SELECT /* # hello */ 1;
|
||||
SELECT '
|
||||
# hello', 1;
|
@ -0,0 +1,5 @@
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
OK
|
11
tests/queries/0_stateless/02192_comment_failure.sh
Executable file
11
tests/queries/0_stateless/02192_comment_failure.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CUR_DIR"/../shell_config.sh
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query="#" 2>&1 | grep -F -q 'Syntax error' && echo 'OK' || echo 'FAIL'
|
||||
${CLICKHOUSE_CLIENT} --query="#not a comemnt" 2>&1 | grep -F -q 'Syntax error' && echo 'OK' || echo 'FAIL'
|
||||
${CLICKHOUSE_CLIENT} --query="select 1 #not a comemnt" 2>&1 | grep -F -q 'Syntax error' && echo 'OK' || echo 'FAIL'
|
||||
${CLICKHOUSE_CLIENT} --query="select 1 #" 2>&1 | grep -F -q 'Syntax error' && echo 'OK' || echo 'FAIL'
|
||||
${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}" -d "select 42 #" 2>&1 | grep -F -q 'Syntax error' && echo 'OK' || echo 'FAIL'
|
Loading…
Reference in New Issue
Block a user