mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
add test
This commit is contained in:
parent
fe16aec48b
commit
fb5de60d7a
29
tests/queries/0_stateless/01610_client_spawn_editor.sh
Executable file
29
tests/queries/0_stateless/01610_client_spawn_editor.sh
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#\
|
||||||
|
export CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
|
#\
|
||||||
|
. "$CURDIR"/../shell_config.sh
|
||||||
|
#\
|
||||||
|
export EDITOR=$CURDIR/01610_client_spawn_editor_open.editor
|
||||||
|
#\
|
||||||
|
exec expect -f $CURDIR/01610_client_spawn_editor.sh "$@"
|
||||||
|
|
||||||
|
log_user 0
|
||||||
|
set timeout 1
|
||||||
|
|
||||||
|
spawn clickhouse-client
|
||||||
|
expect ":) "
|
||||||
|
|
||||||
|
# Open EDITOR
|
||||||
|
send -- "\033E"
|
||||||
|
# Send return
|
||||||
|
send -- "\r"
|
||||||
|
expect {
|
||||||
|
"│ 1 │" { }
|
||||||
|
timeout { exit 1 }
|
||||||
|
}
|
||||||
|
expect ":) "
|
||||||
|
|
||||||
|
send -- ""
|
||||||
|
expect eof
|
3
tests/queries/0_stateless/01610_client_spawn_editor_open.editor
Executable file
3
tests/queries/0_stateless/01610_client_spawn_editor_open.editor
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
echo "select 1" > "$1"
|
Loading…
Reference in New Issue
Block a user