From 08608064b273bbe55f8b075202b820f8e002a91e Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Tue, 5 Aug 2014 21:23:37 +0200 Subject: [PATCH] Enhance plugin installation test --- tests/expect_successful_plugin_download | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/tests/expect_successful_plugin_download b/tests/expect_successful_plugin_download index fdadc3f..027af37 100755 --- a/tests/expect_successful_plugin_download +++ b/tests/expect_successful_plugin_download @@ -21,7 +21,10 @@ expect { expect { "\"tmux-example-plugin\" download success" { - expect { "Done, press ENTER to continue" { exit } } + expect { "Done, press ENTER to continue" { + send " " + } + } } } @@ -29,7 +32,23 @@ expect { } timeout { - puts "Plugin update timeout"; + puts "Plugin installation timeout (1)"; + exit 1 + } +} + +# this is tmux prefix + I +send "I" + +expect { + "Already installed \"tmux-example-plugin\"" { + + expect { "Done, press ENTER to continue" { exit 0 } } + + } + + timeout { + puts "Plugin installation timeout (2)"; exit 1 } }