X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=t%2Ft3903-stash.sh;h=5514f74b30aa74fe2bf214e90f9ad8f4da2876e4;hb=d7173d942ea897b67ac9ba3bab2a0cc374684ca6;hp=7a3fb679571a9fc79135f8b9495462f723b663af;hpb=f00ecbe42b82f3c8e6a170074f2299487026e400;p=git.git diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 7a3fb6795..476e5ec03 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -194,10 +194,38 @@ test_expect_success 'pop -q is quiet' ' test ! -s output.out ' +test_expect_success 'pop -q --index works and is quiet' ' + echo foo > file && + git add file && + git stash save --quiet && + git stash pop -q --index > output.out 2>&1 && + test foo = "$(git show :file)" && + test ! -s output.out +' + test_expect_success 'drop -q is quiet' ' git stash && git stash drop -q > output.out 2>&1 && test ! -s output.out ' +test_expect_success 'stash -k' ' + echo bar3 > file && + echo bar4 > file2 && + git add file2 && + git stash -k && + test bar,bar4 = $(cat file),$(cat file2) +' + +test_expect_success 'stash --invalid-option' ' + echo bar5 > file && + echo bar6 > file2 && + git add file2 && + test_must_fail git stash --invalid-option && + test_must_fail git stash save --invalid-option && + test bar5,bar6 = $(cat file),$(cat file2) && + git stash -- -message-starting-with-dash && + test bar,bar2 = $(cat file),$(cat file2) +' + test_done