mirror of
https://github.com/tmux-plugins/tpm.git
synced 2025-09-05 17:26:58 +00:00
Add tests for updating plugins
This commit is contained in:
67
tests/expect_successful_update_of_all_plugins
Executable file
67
tests/expect_successful_update_of_all_plugins
Executable file
@ -0,0 +1,67 @@
|
||||
#!/usr/bin/env expect
|
||||
|
||||
# disables script output
|
||||
log_user 0
|
||||
|
||||
spawn tmux
|
||||
|
||||
# Waiting for tmux to attach. If this is not done, next command, `send` will
|
||||
# not work properly.
|
||||
sleep 1
|
||||
|
||||
# this is tmux prefix + U
|
||||
send "U"
|
||||
|
||||
set timeout 5
|
||||
|
||||
expect {
|
||||
"Installed plugins" {
|
||||
|
||||
expect {
|
||||
"\"tmux-example-plugin\"" {
|
||||
|
||||
expect {
|
||||
"\"all\" - updates all plugins" {
|
||||
|
||||
expect { "ENTER - cancels" }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
timeout {
|
||||
puts "Plugin update prompt timeout";
|
||||
exit 1
|
||||
}
|
||||
}
|
||||
|
||||
send "all\r"
|
||||
|
||||
expect {
|
||||
"Updating all plugins!" {
|
||||
|
||||
expect {
|
||||
"Updating \"tmux-example-plugin\"" {
|
||||
|
||||
expect {
|
||||
"\"tmux-example-plugin\" update success" {
|
||||
|
||||
expect { "Done, press ENTER to continue." { exit 0 } }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
timeout {
|
||||
puts "Update all plugins timeout";
|
||||
exit 1
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user