t5520: remove redundant lines in test cases
In the previous patches, the mechanical application of changes left some duplicate statements in the test case which were not strictly incorrect but were redundant and possibly misleading. Remove these duplicate statements so that it is clear that the intent behind the tests are that the content of the file stays the same throughout the whole test case. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
a1a64fdd0a
commit
c245e58bb6
@ -147,7 +147,6 @@ test_expect_success 'fail if wildcard spec does not match any refs' '
|
|||||||
test_cmp expect file &&
|
test_cmp expect file &&
|
||||||
test_must_fail git pull . "refs/nonexisting1/*:refs/nonexisting2/*" 2>err &&
|
test_must_fail git pull . "refs/nonexisting1/*:refs/nonexisting2/*" 2>err &&
|
||||||
test_i18ngrep "no candidates for merging" err &&
|
test_i18ngrep "no candidates for merging" err &&
|
||||||
echo file >expect &&
|
|
||||||
test_cmp expect file
|
test_cmp expect file
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -161,7 +160,6 @@ test_expect_success 'fail if no branches specified with non-default remote' '
|
|||||||
test_config branch.test.remote origin &&
|
test_config branch.test.remote origin &&
|
||||||
test_must_fail git pull test_remote 2>err &&
|
test_must_fail git pull test_remote 2>err &&
|
||||||
test_i18ngrep "specify a branch on the command line" err &&
|
test_i18ngrep "specify a branch on the command line" err &&
|
||||||
echo file >expect &&
|
|
||||||
test_cmp expect file
|
test_cmp expect file
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -174,7 +172,6 @@ test_expect_success 'fail if not on a branch' '
|
|||||||
test_cmp expect file &&
|
test_cmp expect file &&
|
||||||
test_must_fail git pull 2>err &&
|
test_must_fail git pull 2>err &&
|
||||||
test_i18ngrep "not currently on a branch" err &&
|
test_i18ngrep "not currently on a branch" err &&
|
||||||
echo file >expect &&
|
|
||||||
test_cmp expect file
|
test_cmp expect file
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -188,7 +185,6 @@ test_expect_success 'fail if no configuration for current branch' '
|
|||||||
test_cmp expect file &&
|
test_cmp expect file &&
|
||||||
test_must_fail git pull 2>err &&
|
test_must_fail git pull 2>err &&
|
||||||
test_i18ngrep "no tracking information" err &&
|
test_i18ngrep "no tracking information" err &&
|
||||||
echo file >expect &&
|
|
||||||
test_cmp expect file
|
test_cmp expect file
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -202,7 +198,6 @@ test_expect_success 'pull --all: fail if no configuration for current branch' '
|
|||||||
test_cmp expect file &&
|
test_cmp expect file &&
|
||||||
test_must_fail git pull --all 2>err &&
|
test_must_fail git pull --all 2>err &&
|
||||||
test_i18ngrep "There is no tracking information" err &&
|
test_i18ngrep "There is no tracking information" err &&
|
||||||
echo file >expect &&
|
|
||||||
test_cmp expect file
|
test_cmp expect file
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -215,7 +210,6 @@ test_expect_success 'fail if upstream branch does not exist' '
|
|||||||
test_cmp expect file &&
|
test_cmp expect file &&
|
||||||
test_must_fail git pull 2>err &&
|
test_must_fail git pull 2>err &&
|
||||||
test_i18ngrep "no such ref was fetched" err &&
|
test_i18ngrep "no such ref was fetched" err &&
|
||||||
echo file >expect &&
|
|
||||||
test_cmp expect file
|
test_cmp expect file
|
||||||
'
|
'
|
||||||
|
|
||||||
@ -685,10 +679,8 @@ test_expect_success 'pull --rebase fails on unborn branch with staged changes' '
|
|||||||
git ls-files >actual &&
|
git ls-files >actual &&
|
||||||
test_cmp expect actual &&
|
test_cmp expect actual &&
|
||||||
test_must_fail git pull --rebase .. master 2>err &&
|
test_must_fail git pull --rebase .. master 2>err &&
|
||||||
echo staged-file >expect &&
|
|
||||||
git ls-files >actual &&
|
git ls-files >actual &&
|
||||||
test_cmp expect actual &&
|
test_cmp expect actual &&
|
||||||
echo staged-file >expect &&
|
|
||||||
git show :staged-file >actual &&
|
git show :staged-file >actual &&
|
||||||
test_cmp expect actual &&
|
test_cmp expect actual &&
|
||||||
test_i18ngrep "unborn branch with changes added to the index" err
|
test_i18ngrep "unborn branch with changes added to the index" err
|
||||||
|
Loading…
Reference in New Issue
Block a user