Skip to content

Commit d668518

Browse files
jinohkang-theorigitster
authored andcommitted
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 <[email protected]> Signed-off-by: Jinoh Kang <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2469593 commit d668518

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

t/t7800-difftool.sh

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -730,25 +730,15 @@ test_expect_success 'add -N and difftool -d' '
730730

731731
test_expect_success 'difftool --cached with unmerged files' '
732732
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
752742
'
753743

754744
test_expect_success 'outside worktree' '

0 commit comments

Comments
 (0)