Skip to content

Commit

Permalink
diff test: add tests for combine-diff with orderfile
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kirill Smelkov authored and Junio C Hamano committed Feb 24, 2014
1 parent 1df4320 commit 91921ce
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions t/t4056-diff-order.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 91921ce

Please sign in to comment.