mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-15 00:50:22 -06:00
test updates
This commit is contained in:
@@ -21,13 +21,9 @@ teardown() {
|
||||
teardown_common
|
||||
}
|
||||
|
||||
|
||||
# bats test_tags=no_lambda
|
||||
@test "sql-shell: warnings are not suppressed" {
|
||||
skiponwindows "Need to install expect and make this script work on windows."
|
||||
if [ "$SQL_ENGINE" = "remote-engine" ]; then
|
||||
skip "session ctx in shell is no the same as session in server"
|
||||
fi
|
||||
run $BATS_TEST_DIRNAME/sql-shell-warnings.expect
|
||||
echo "$output"
|
||||
|
||||
@@ -36,15 +32,17 @@ teardown() {
|
||||
[[ "$output" =~ "Division by 0" ]] || false
|
||||
}
|
||||
|
||||
# bats test_tags=no_lambda
|
||||
@test "sql-shell: can toggle warning details" {
|
||||
skiponwindows "Need to install expect and make this script work on windows."
|
||||
|
||||
run $BATS_TEST_DIRNAME/sql-warning-summary.expect
|
||||
|
||||
[[ "$output" =~ "EXPLAIN Output is currently a placeholder" ]] || false
|
||||
[ "$status" -eq 0 ]
|
||||
! [[ "$output" =~ "Warning (Code 1365): Division by 0" ]] || false
|
||||
}
|
||||
|
||||
# bats test_tags=no_lambda
|
||||
@test "sql-shell: can toggle warning summary" {
|
||||
skiponwindows "Need to install expect and make this script work on windows."
|
||||
|
||||
|
||||
@@ -7,24 +7,12 @@ source "$env(BATS_CWD)/helper/common_expect_functions.tcl"
|
||||
|
||||
spawn dolt sql
|
||||
|
||||
expect {
|
||||
-re "dolt-repo-.*> " {send "explain select * from test;\r"; }
|
||||
timeout { exit 1; }
|
||||
failed { exit 1; }
|
||||
}
|
||||
expect_with_defaults {dolt-repo-.*>} { send "explain select * from t;"; }
|
||||
|
||||
expect_with_defaults {dolt-repo-.*>} { send "\\w\r"; }
|
||||
expect_with_defaults_2 {EXPLAIN output is currently a placeholder} {dolt-repo-.*>} { send "\\w\r"; }
|
||||
|
||||
expect {
|
||||
-re "dolt-repo-.*> " { send "select 1/0;\r"; }
|
||||
timeout { exit 1; }
|
||||
failed { exit 1; }
|
||||
}
|
||||
expect_with_defaults_2 {Show warnings disabled} {dolt-repo-.*>} { send "select 1/0;"; }
|
||||
|
||||
expect {
|
||||
-re "dolt-repo-.*> " { send "exit;\r"; }
|
||||
timeout { exit 1; }
|
||||
failed { exit 1; }
|
||||
}
|
||||
expect_with_defaults {dolt-repo-.*>} { send "exit;"; }
|
||||
|
||||
expect eof
|
||||
Reference in New Issue
Block a user