Files
dolt/integration-tests/bats/sql-shell-empty-prompt.expect
2023-07-18 15:56:43 -07:00

33 lines
412 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; }
}
expect {
"> " { send "exit;\r"; }
timeout { exit 1; }
}
expect {
eof { }
timeout { exit 1; }
}
set waitval [wait -i $spawn_id]
set exval [lindex $waitval 3]
exit $exval