mirror of
https://github.com/tmux-plugins/tpm.git
synced 2025-09-14 00:46:56 +00:00
Refactor test 'expect' scripts
Make test 'expect' scripts simpler and ensure expectations are properly asserted. Closes #46
This commit is contained in:
@ -15,32 +15,30 @@ send "I"
|
||||
# cloning might take a while
|
||||
set timeout 15
|
||||
|
||||
expect { "Installing \"tmux-example-plugin\"" {
|
||||
expect_after {
|
||||
timeout { exit 1 }
|
||||
}
|
||||
|
||||
expect { "\"tmux-example-plugin\" download success" {
|
||||
expect {
|
||||
"Installing \"tmux-example-plugin\""
|
||||
}
|
||||
|
||||
expect { "Installing \"tmux-copycat\"" {
|
||||
expect {
|
||||
"\"tmux-example-plugin\" download success"
|
||||
}
|
||||
|
||||
expect { "\"tmux-copycat\" download success" {
|
||||
expect {
|
||||
"Installing \"tmux-copycat\""
|
||||
}
|
||||
|
||||
expect { "Done, press ENTER to continue" {
|
||||
send "
|
||||
"
|
||||
}
|
||||
expect {
|
||||
"\"tmux-copycat\" download success"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} # "tmux-copycat" download success
|
||||
|
||||
}
|
||||
} # Installing "tmux-copycat"
|
||||
|
||||
}
|
||||
} # "tmux-example-plugin" download success
|
||||
|
||||
}
|
||||
|
||||
timeout {
|
||||
puts "Multiple plugins installation timeout";
|
||||
expect {
|
||||
"Done, press ENTER to continue." {
|
||||
exit 0
|
||||
}
|
||||
}
|
||||
|
||||
exit 1
|
||||
|
Reference in New Issue
Block a user