From 7638ce558f7b0df1f2102e730adb1c53c93a0c56 Mon Sep 17 00:00:00 2001 From: Amos Bird Date: Fri, 10 Dec 2021 17:18:21 +0800 Subject: [PATCH] Add test --- .../02132_client_history_navigation.expect | 33 +++++++++++++++++++ .../02132_client_history_navigation.reference | 0 2 files changed, 33 insertions(+) create mode 100755 tests/queries/0_stateless/02132_client_history_navigation.expect create mode 100644 tests/queries/0_stateless/02132_client_history_navigation.reference diff --git a/tests/queries/0_stateless/02132_client_history_navigation.expect b/tests/queries/0_stateless/02132_client_history_navigation.expect new file mode 100755 index 00000000000..129a65e0a0a --- /dev/null +++ b/tests/queries/0_stateless/02132_client_history_navigation.expect @@ -0,0 +1,33 @@ +#!/usr/bin/expect -f +# Tags: no-fasttest + +log_user 0 +set timeout 3 +match_max 100000 +# A default timeout action is to do nothing, change it to fail +expect_after { + timeout { + exit 1 + } +} + +# useful debugging configuration +# exp_internal 1 + +set basedir [file dirname $argv0] +spawn bash -c "source $basedir/../shell_config.sh ; \$CLICKHOUSE_CLIENT_BINARY \$CLICKHOUSE_CLIENT_OPT --disable_suggestion --highlight 0" +expect ":) " + +# Make a query +send -- "SELECT 1\r" +expect "1" +expect ":) " +send -- "SELECT 2" +send -- "\033\[A" +expect "SELECT 1" +send -- "\033\[B" +expect "SELECT 2" +send -- "\r" +expect "2" +send -- "exit\r" +expect eof diff --git a/tests/queries/0_stateless/02132_client_history_navigation.reference b/tests/queries/0_stateless/02132_client_history_navigation.reference new file mode 100644 index 00000000000..e69de29bb2d