mirror of
https://github.com/git-for-windows/git.git
synced 2026-03-17 13:23:05 -05:00
fixup! stash: improve option parsing test coverage
In preparation for a newer patch series. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -444,36 +444,6 @@ test_expect_failure 'stash file to directory' '
|
||||
test foo = "$(cat file/file)"
|
||||
'
|
||||
|
||||
test_expect_success 'giving too many ref arguments does not modify files' '
|
||||
git stash clear &&
|
||||
test_when_finished "git reset --hard HEAD" &&
|
||||
echo foo >file2 &&
|
||||
git stash &&
|
||||
echo bar >file2 &&
|
||||
git stash &&
|
||||
test-tool chmtime =123456789 file2 &&
|
||||
for type in apply pop "branch stash-branch"
|
||||
do
|
||||
test_must_fail git stash $type stash@{0} stash@{1} 2>err &&
|
||||
test_i18ngrep "Too many revisions" err &&
|
||||
test 123456789 = $(test-tool chmtime -g file2) || return 1
|
||||
done
|
||||
'
|
||||
|
||||
test_expect_success 'drop: too many arguments errors out (does nothing)' '
|
||||
git stash list >expect &&
|
||||
test_must_fail git stash drop stash@{0} stash@{1} 2>err &&
|
||||
test_i18ngrep "Too many revisions" err &&
|
||||
git stash list >actual &&
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
test_expect_success 'show: too many arguments errors out (does nothing)' '
|
||||
test_must_fail git stash show stash@{0} stash@{1} 2>err 1>out &&
|
||||
test_i18ngrep "Too many revisions" err &&
|
||||
test_must_be_empty out
|
||||
'
|
||||
|
||||
test_expect_success 'stash create - no changes' '
|
||||
git stash clear &&
|
||||
test_when_finished "git reset --hard HEAD" &&
|
||||
@@ -509,11 +479,6 @@ test_expect_success 'stash branch - stashes on stack, stash-like argument' '
|
||||
test $(git ls-files --modified | wc -l) -eq 1
|
||||
'
|
||||
|
||||
test_expect_success 'stash branch complains with no arguments' '
|
||||
test_must_fail git stash branch 2>err &&
|
||||
test_i18ngrep "No branch name specified" err
|
||||
'
|
||||
|
||||
test_expect_success 'stash show format defaults to --stat' '
|
||||
git stash clear &&
|
||||
test_when_finished "git reset --hard HEAD" &&
|
||||
|
||||
Reference in New Issue
Block a user