Files
dolt/integration-tests/bats/add-patch-expect/keyless.expect
T
Neil Macneale IV a36abb546b Keyless test
2024-09-12 14:28:20 -07:00

23 lines
873 B
Plaintext
Executable File

#!/usr/bin/expect
set timeout 5
set env(NO_COLOR) 1
source "$env(BATS_CWD)/helper/common_expect_functions.tcl"
spawn dolt add --patch
# Header Regex for:
# Table Added / Modified / Removed
# ===== ===== ======== =======
# keyless 1 1 1
set header {.*Table\s+Added\s+/\s+Modified\s+/\s+Removed\s+=+\s+=+\s+=+\s+=+\s+keyless\s+2\s+0\s+2.*}
expect_with_defaults_2 $header {Stage this row \[y,n,q,a,d,s,\?\]\? } { send "y\r"; }
expect_with_defaults_2 {| - | 1 | 1 |} {Stage this row \[y,n,q,a,d,s,\?\]\? } { send "n\r"; }
expect_with_defaults_2 {| \+ | 4 | 4 |} {Stage this row \[y,n,q,a,d,s,\?\]\? } { send "y\r"; }
expect_with_defaults_2 {| \+ | 4 | 4 |} {Stage this row \[y,n,q,a,d,s,\?\]\? } { send "n\r"; }
expect eof
exit