Stub out zsh's vared in tests

This commit is contained in:
Nathan Broadbent
2012-08-28 12:26:57 +12:00
parent 8a8131129c
commit eeb5d321d6

View File

@@ -240,7 +240,10 @@ test_git_commit_prompt() {
touch a b c d touch a b c d
git add . > /dev/null 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. # instead of user input.
echo "$commit_msg" | git_commit_prompt > /dev/null echo "$commit_msg" | git_commit_prompt > /dev/null
@@ -260,7 +263,7 @@ test_adding_files_with_spaces() {
test_file="file with spaces.txt" test_file="file with spaces.txt"
touch "$test_file" touch "$test_file"
e1="$testRepo/$test_file" e1="$testRepo/$test_file"
git_add_shortcuts 1 > /dev/null git_add_shortcuts 1 > /dev/null
# Test that file is added by looking at git status # Test that file is added by looking at git status