#!/usr/bin/expect

set timeout 5
set env(NO_COLOR) 1
spawn dolt sql

expect {
    -re "dolt-repo-.*> " { send "select 1/0;\r"; }
    timeout { exit 1; }
    failed { exit 1; }
}

expect {
    -re "dolt-repo-.*> " { send "show warnings;\r"; }
    timeout { exit 1; }
    failed { exit 1; }
}

expect {
    -re "dolt-repo-.*> " { send "exit;\r"; }
    timeout { exit 1; }
    failed { exit 1; }
}

expect eof