Refactor test 'expect' scripts

Make test 'expect' scripts simpler and ensure expectations are properly
asserted.

Closes #46
This commit is contained in:
Bruno Sutic
2015-08-02 22:46:57 +02:00
parent d19c187dcc
commit c435ead1a3
7 changed files with 133 additions and 151 deletions

View File

@ -14,17 +14,22 @@ send "u"
set timeout 5
expect {
"Removing \"tmux-example-plugin\"" {
expect {
"\"tmux-example-plugin\" clean success" {
expect { "Done, press ENTER to continue." { exit 0 } }
}
}
}
expect_after {
timeout { exit 1 }
}
timeout {
puts "Plugin update prompt timeout";
exit 1
expect {
"Removing \"tmux-example-plugin\""
}
expect {
"\"tmux-example-plugin\" clean success"
}
expect {
"Done, press ENTER to continue." {
exit 0
}
}
exit 1