From 9b24e17c37315cf8b2e8d420e2bba4fe5f4def84 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Thu, 20 Oct 2011 20:37:56 +0800 Subject: [PATCH] Added test to make sure 'gc -m "commit message"' works. (args remain quoted when they contain a space) --- test/lib/git/status_shortcuts_test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/lib/git/status_shortcuts_test.sh b/test/lib/git/status_shortcuts_test.sh index 62f524b..ac8b819 100755 --- a/test/lib/git/status_shortcuts_test.sh +++ b/test/lib/git/status_shortcuts_test.sh @@ -53,6 +53,11 @@ test_git_expand_args() { assertEquals "$error" "one three seven" "$(git_expand_args 1 3 7)" assertEquals "$error" "one two three six" "$(git_expand_args 1..3 6)" assertEquals "$error" "seven two three four five one" "$(git_expand_args seven 2..5 1)" + + # Test that any args with spaces remain quoted + assertEquals "$error" "-m \"Test Commit Message\" one" "$(git_expand_args -m \"Test Commit Message\" 1)" + assertEquals "$error" "-ma \"Test Commit Message\" Unquoted"\ + "$(git_expand_args -ma "Test Commit Message" "Unquoted")" }