Add a test

This commit is contained in:
Alexey Milovidov 2020-11-29 17:50:50 +03:00
parent f80ae936ad
commit 98f9670f69
2 changed files with 25 additions and 0 deletions

View File

@ -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