diff options
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-x | t/t3903-stash.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index ea56e85e70..9f7ca98967 100755 --- a/t/t3903-stash.sh +++ b/t/t3903-stash.sh @@ -285,6 +285,11 @@ test_expect_success 'stash --no-keep-index' ' test bar,bar2 = $(cat file),$(cat file2) ' +test_expect_success 'dont assume push with non-option args' ' + test_must_fail git stash -q drop 2>err && + test_i18ngrep -e "subcommand wasn'\''t specified; '\''push'\'' can'\''t be assumed due to unexpected token '\''drop'\''" err +' + test_expect_success 'stash --invalid-option' ' echo bar5 >file && echo bar6 >file2 && @@ -1285,4 +1290,18 @@ test_expect_success 'stash handles skip-worktree entries nicely' ' git rev-parse --verify refs/stash:A.t ' +test_expect_success 'stash -c stash.useBuiltin=false warning ' ' + expected="stash.useBuiltin support has been removed" && + + git -c stash.useBuiltin=false stash 2>err && + test_i18ngrep "$expected" err && + env GIT_TEST_STASH_USE_BUILTIN=false git stash 2>err && + test_i18ngrep "$expected" err && + + git -c stash.useBuiltin=true stash 2>err && + test_must_be_empty err && + env GIT_TEST_STASH_USE_BUILTIN=true git stash 2>err && + test_must_be_empty err +' + test_done |