From 98f9670f6915b347dd1e73ab00e19a452110ccf2 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 29 Nov 2020 17:50:50 +0300 Subject: [PATCH] Add a test --- ...ne_input_and_singleline_comments.reference | 0 ...multiline_input_and_singleline_comments.sh | 25 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 tests/queries/0_stateless/01599_multiline_input_and_singleline_comments.reference create mode 100755 tests/queries/0_stateless/01599_multiline_input_and_singleline_comments.sh diff --git a/tests/queries/0_stateless/01599_multiline_input_and_singleline_comments.reference b/tests/queries/0_stateless/01599_multiline_input_and_singleline_comments.reference new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/queries/0_stateless/01599_multiline_input_and_singleline_comments.sh b/tests/queries/0_stateless/01599_multiline_input_and_singleline_comments.sh new file mode 100755 index 00000000000..5b7d1356dc6 --- /dev/null +++ b/tests/queries/0_stateless/01599_multiline_input_and_singleline_comments.sh @@ -0,0 +1,25 @@ +#!/usr/bin/expect -f + +log_user 0 +set timeout 5 +match_max 100000 + +if ![info exists env(CLICKHOUSE_PORT_TCP)] {set env(CLICKHOUSE_PORT_TCP) 9000} + +spawn clickhouse-client --multiline --port "$env(CLICKHOUSE_PORT_TCP)" +expect ":) " + +# Make a query +send -- "SELECT 1\r" +expect ":-] " +send -- "-- xxx\r" +expect ":-] " +send -- ", 2\r" +expect ":-] " +send -- ";\r" + +expect "│ 1 │ 2 │" +expect ":) " + +send -- "\4" +expect eof