From eeb5d321d6c83f69cb1af7e7b46e4565c135023a Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Tue, 28 Aug 2012 12:26:57 +1200 Subject: [PATCH] Stub out zsh's vared in tests --- test/lib/git/status_shortcuts_test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/lib/git/status_shortcuts_test.sh b/test/lib/git/status_shortcuts_test.sh index 5f938c4..b7377a3 100755 --- a/test/lib/git/status_shortcuts_test.sh +++ b/test/lib/git/status_shortcuts_test.sh @@ -240,7 +240,10 @@ test_git_commit_prompt() { touch a b c d git add . > /dev/null - # Lightly test the git commit prompt, by piping a commit message + # Zsh 'vared' doesn't handle input via pipe, so replace with function that reads into commit_msg variable. + function vared(){ read commit_msg; } + + # Test the git commit prompt, by piping a commit message # instead of user input. echo "$commit_msg" | git_commit_prompt > /dev/null @@ -260,7 +263,7 @@ test_adding_files_with_spaces() { test_file="file with spaces.txt" touch "$test_file" - e1="$testRepo/$test_file" + e1="$testRepo/$test_file" git_add_shortcuts 1 > /dev/null # Test that file is added by looking at git status