summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Smelkov <kirr@mns.spb.ru>2014-01-20 16:20:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-02-24 22:44:57 (GMT)
commit91921ceff60ccf7a9e80749eb28fabfb8399d371 (patch)
treee731e975048f6160fdf4949a3b4349e0618bd03a
parent1df4320fa25d3784b035936b35725460d46f1ca0 (diff)
downloadgit-91921ceff60ccf7a9e80749eb28fabfb8399d371.zip
git-91921ceff60ccf7a9e80749eb28fabfb8399d371.tar.gz
git-91921ceff60ccf7a9e80749eb28fabfb8399d371.tar.bz2
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>
-rwxr-xr-xt/t4056-diff-order.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/t/t4056-diff-order.sh b/t/t4056-diff-order.sh
index 9e2b29e..c0460bb 100755
--- a/t/t4056-diff-order.sh
+++ b/t/t4056-diff-order.sh
@@ -97,4 +97,25 @@ do
'
done
+test_expect_success 'setup for testing combine-diff order' '
+ git checkout -b tmp HEAD~ &&
+ create_files 3 &&
+ git checkout master &&
+ git merge --no-commit -s ours tmp &&
+ create_files 5
+'
+
+test_expect_success "combine-diff: no order (=tree object order)" '
+ git diff --name-only HEAD HEAD^ HEAD^2 >actual &&
+ test_cmp expect_none actual
+'
+
+for i in 1 2
+do
+ test_expect_success "combine-diff: orderfile using option ($i)" '
+ git diff -Oorder_file_$i --name-only HEAD HEAD^ HEAD^2 >actual &&
+ test_cmp expect_$i actual
+ '
+done
+
test_done