diff options
author | Thomas Gummerer <t.gummerer@gmail.com> | 2017-02-19 11:03:09 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-02-20 07:47:41 (GMT) |
commit | 6f5ccd4df56da70434cd807a458a4de015098971 (patch) | |
tree | 31238beb876b2c30e2217fccbc72caf7320d95fb /t/t3903-stash.sh | |
parent | f5727e26e44dbbf564034d3993d4d2f65dacd6fb (diff) | |
download | git-6f5ccd4df56da70434cd807a458a4de015098971.zip git-6f5ccd4df56da70434cd807a458a4de015098971.tar.gz git-6f5ccd4df56da70434cd807a458a4de015098971.tar.bz2 |
stash: add test for the create command line arguments
Currently there is no test showing the expected behaviour of git stash
create's command line arguments. Add a test for that to show the
current expected behaviour and to make sure future refactorings don't
break those expectations.
Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-x | t/t3903-stash.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 3577115..ffe3549 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -784,4 +784,22 @@ test_expect_success 'push -m shows right message' ' test_cmp expect actual ' +test_expect_success 'create stores correct message' ' + >foo && + git add foo && + STASH_ID=$(git stash create "create test message") && + echo "On master: create test message" >expect && + git show --pretty=%s -s ${STASH_ID} >actual && + test_cmp expect actual +' + +test_expect_success 'create with multiple arguments for the message' ' + >foo && + git add foo && + STASH_ID=$(git stash create test untracked) && + echo "On master: test untracked" >expect && + git show --pretty=%s -s ${STASH_ID} >actual && + test_cmp expect actual +' + test_done |