Files
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

63 lines
1.4 KiB
Plaintext

#!/usr/bin/expect
set timeout 3
spawn dolt sql
# This script uses undefined variables in the failure case so that
# error output includes the line of the failed test expectation
expect {
-re ".*doltsql.*/.*main.*> " { send -- "use `doltsql/test`;\r"; }
timeout { puts "$TESTFAILURE"; }
}
expect {
-re ".*doltsql.*/.*test.*> " { send -- "show tables;\r"; }
timeout { puts "$TESTFAILURE"; }
}
expect {
-re ".*doltsql.*/.*test.*> " { send -- "use information_schema;\r"; }
timeout { puts "$TESTFAILURE"; }
}
expect {
-re ".*information_schema.*> " { send -- "show tables;\r"; }
timeout { puts "$TESTFAILURE"; }
}
expect {
-re ".*information_schema.*> " { send -- "CREATE DATABASE mydb;\r"; }
timeout { puts "$TESTFAILURE"; }
}
expect {
-re ".*information_schema.*> " { send -- "use db1;\r"; }
timeout { puts "$TESTFAILURE"; }
}
expect {
-re "|.*db1.*|\r.*db1.*> " { send -- "select database();\r"; }
timeout { puts "$TESTFAILURE"; }
}
expect {
-re ".*db1.*/.*main.*>" { send -- "use db2;\r"; }
timeout { puts "$TESTFAILURE"; }
}
expect {
-re ".*db2.*/.*main.*> " { send -- "select database();\r"; }
timeout { puts "$TESTFAILURE"; }
}
expect {
-re "|.*db2.*|.*\rdb2/main>" { send -- "use mydb;\r"; }
timeout { puts "$TESTFAILURE"; }
}
expect {
-re ".*mydb.*/.*main.*> " { send -- "exit ;\r"; }
timeout { puts "$TESTFAILURE"; }
}