Skip to content

Commit 91921ce

Browse files
Kirill Smelkovgitster
authored andcommitted
diff test: add tests for combine-diff with orderfile
In the next patch combine-diff will have special code-path for taking orderfile into account. Prepare for making changes by introducing coverage tests for that case. Signed-off-by: Kirill Smelkov <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1df4320 commit 91921ce

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

t/t4056-diff-order.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,25 @@ do
9797
'
9898
done
9999

100+
test_expect_success 'setup for testing combine-diff order' '
101+
git checkout -b tmp HEAD~ &&
102+
create_files 3 &&
103+
git checkout master &&
104+
git merge --no-commit -s ours tmp &&
105+
create_files 5
106+
'
107+
108+
test_expect_success "combine-diff: no order (=tree object order)" '
109+
git diff --name-only HEAD HEAD^ HEAD^2 >actual &&
110+
test_cmp expect_none actual
111+
'
112+
113+
for i in 1 2
114+
do
115+
test_expect_success "combine-diff: orderfile using option ($i)" '
116+
git diff -Oorder_file_$i --name-only HEAD HEAD^ HEAD^2 >actual &&
117+
test_cmp expect_$i actual
118+
'
119+
done
120+
100121
test_done

0 commit comments

Comments
 (0)