mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-11 02:59:34 -06:00
Testing changes
This commit is contained in:
@@ -50,6 +50,16 @@ teardown() {
|
||||
! [[ "$output" =~ "1 row in set, 3 warnings" ]] || false
|
||||
}
|
||||
|
||||
# bats test_tabs=no_lambda
|
||||
@test "sql-shell: show warnings hides warning summary, and removes whitespace" {
|
||||
skiponwindows "Need to install expect and make this script work on windows."
|
||||
run $BATS_TEST_DIRNAME/sql-show-warnings.expect
|
||||
|
||||
echo "$output"
|
||||
[ "$status" -eq 0 ]
|
||||
|
||||
}
|
||||
|
||||
@test "sql-shell: use user without privileges, and no superuser created" {
|
||||
rm -rf .doltcfg
|
||||
|
||||
|
||||
16
integration-tests/bats/sql-show-warnings.expect
Executable file
16
integration-tests/bats/sql-show-warnings.expect
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/expect
|
||||
|
||||
set timeout 5
|
||||
set env(NO_COLOR) 1
|
||||
|
||||
source "$env(BATS_CWD)/helper/common_expect_functions.tcl"
|
||||
|
||||
spawn dolt sql
|
||||
|
||||
expect_with_defaults {dolt-repo-.*} { send " shoW warNinGs ; \r"; }
|
||||
|
||||
expect_with_defaults_2 {Empty set} {dolt-repo-.*} { send "select 1/0;\r"; }
|
||||
|
||||
expect_with_defaults {dolt-repo-.*} { send " shoW warNinGs ; \r"; }
|
||||
|
||||
expect_with_defaults_2 {Division by 0 } {dolt-repo-.*} { send "exit;\r"; }
|
||||
Reference in New Issue
Block a user