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 <kirr@mns.spb.ru> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Kirill Smelkov committed Jan 20, 2014 at 20:20 UTC 91921ceff60ccf7a9e80749eb28fabfb8399d371
1 file changed +21
t/t4056-diff-order.sh
+21
@@ -97,4 +97,25 @@ do
97 '
98 done
99
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 +
121 test_done