From 93dc4a488fd08f22a9d57c0a1b1f608b3d20a6e4 Mon Sep 17 00:00:00 2001 From: Jonathan del Strother Date: Sat, 15 Feb 2020 19:11:49 +0000 Subject: [PATCH] Add a test for shell expansion --- features/shell_wrappers.feature | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/features/shell_wrappers.feature b/features/shell_wrappers.feature index 14becf9..d493650 100644 --- a/features/shell_wrappers.feature +++ b/features/shell_wrappers.feature @@ -101,3 +101,32 @@ Feature: optional wrapping of normal git cmds in the shell | shell | | bash | | zsh | + + Scenario Outline: Wrapped `git add` can handle shell expansions + Given I am in a git repository + And an empty file named "file with spaces.txt" + And an empty file named "file2.txt" + And an empty file named "untracked file.txt" + When I run `` interactively + And I type `eval "$(scmpuff init -ws)"` + And I type "scmpuff_status" + And I type `FILE="file with spaces.txt"` + And I type `git add "$FILE" 2` + And I type "exit" + Then the exit status should be 0 + And the output should contain: + """ + new file: [1] file with spaces.txt + """ + And the output should contain: + """ + new file: [2] file2 + """ + And the output should contain: + """ + untracked: [3] untracked file.txt + """ + Examples: + | shell | + | bash | + | zsh |