ClickHouse/tests/queries/0_stateless/03021_output_format_tty.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
683 B
Bash
Raw Normal View History

2024-03-23 01:42:11 +00:00
#!/usr/bin/expect -f
set basedir [file dirname $argv0]
set basename [file tail $argv0]
2024-03-23 17:09:50 +00:00
if {[info exists env(CLICKHOUSE_TMP)]} {
set CLICKHOUSE_TMP $env(CLICKHOUSE_TMP)
} else {
set CLICKHOUSE_TMP "."
}
exp_internal -f $CLICKHOUSE_TMP/$basename.debuglog 0
set history_file $CLICKHOUSE_TMP/$basename.history
2024-03-23 01:42:11 +00:00
2024-03-23 17:09:50 +00:00
log_user 0
2024-03-23 01:42:11 +00:00
set timeout 60
match_max 100000
expect_after {
# Do not ignore eof from expect
-i $any_spawn_id eof { exp_continue }
# A default timeout action is to do nothing, change it to fail
-i $any_spawn_id timeout { exit 1 }
}
2024-03-30 01:36:03 +00:00
spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CLIENT --query 'SELECT 1, 2'"
expect "1\t2"
2024-03-23 01:42:11 +00:00
expect eof