Files
dolthub--dolt/integration-tests/bats/sql-shell-empty-prompt.expect
wehub-resource-sync 5357c39144
Fuzzer / Run Fuzzer (push) Has been cancelled
Race tests / Go race tests (ubuntu-22.04) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:01:40 +08:00

38 lines
732 B
Plaintext
Executable File

#!/usr/bin/expect -f
set timeout 5
spawn dolt sql
expect {
"> " { send "select 23;\r"; }
timeout { exit 1; }
}
expect {
"| 23 |" { }
timeout { exit 1; }
}
expect {
"| 23 |" { }
timeout { exit 1; }
}
# After the query the prompt resolver runs. Verify it does not emit errors when
# no database is selected (regression test for "no database selected" / "Failed
# to set new current database on post command update").
expect {
"no database selected" { exit 1 }
"Failed to set new current database" { exit 1 }
"> " { send "exit;\r"; }
timeout { exit 1; }
}
expect {
eof { }
timeout { exit 1; }
}
set waitval [wait -i $spawn_id]
set exval [lindex $waitval 3]
exit $exval