t7800: simplify difftool test

The new test added by the previous commit can be simplified a lot. Let's do so. Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Jinoh Kang <luke1337@theori.io> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jinoh Kang committed Nov 6, 2020 at 17:14 UTC d66851806ff25c6afdb4650d8292a50d5ca0ea6d
1 file changed +9 -19
t/t7800-difftool.sh
+9 -19
@@ -730,25 +730,15 @@ test_expect_success 'add -N and difftool -d' '
730
731 test_expect_success 'difftool --cached with unmerged files' '
732 test_when_finished git reset --hard &&
733 - echo base >file &&
734 - git add file &&
735 - git commit -m base &&
736 - git checkout -B conflict-a &&
737 - git checkout -B conflict-b &&
738 - git checkout conflict-a &&
739 - echo conflict-a >>file &&
740 - git add file &&
741 - git commit -m conflict-a &&
742 - git checkout conflict-b &&
743 - echo conflict-b >>file &&
744 - git add file &&
745 - git commit -m conflict-b &&
746 - git checkout master &&
747 - git merge conflict-a &&
748 - test_must_fail git merge conflict-b &&
749 - : >expect &&
750 - git difftool --cached --no-prompt >actual &&
751 - test_cmp expect actual
733 +
734 + test_commit conflicting &&
735 + test_commit conflict-a conflict.t a &&
736 + git reset --hard conflicting &&
737 + test_commit conflict-b conflict.t b &&
738 + test_must_fail git merge conflict-a &&
739 +
740 + git difftool --cached --no-prompt >output &&
741 + test_must_be_empty output
742 '
743
744 test_expect_success 'outside worktree' '