Browse Source

t6012: update test for tweaked full-history traversal

Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Junio C Hamano 12 years ago
parent
commit
d5d2fc8b1a
  1. 29
      t/t6012-rev-list-simplify.sh

29
t/t6012-rev-list-simplify.sh

@ -14,21 +14,24 @@ unnote () {


test_expect_success setup ' test_expect_success setup '
echo "Hi there" >file && echo "Hi there" >file &&
git add file && echo "initial" >lost &&
test_tick && git commit -m "Initial file" && git add file lost &&
test_tick && git commit -m "Initial file and lost" &&
note A && note A &&


git branch other-branch && git branch other-branch &&


echo "Hello" >file && echo "Hello" >file &&
git add file && echo "second" >lost &&
test_tick && git commit -m "Modified file" && git add file lost &&
test_tick && git commit -m "Modified file and lost" &&
note B && note B &&


git checkout other-branch && git checkout other-branch &&


echo "Hello" >file && echo "Hello" >file &&
git add file && >lost &&
git add file lost &&
test_tick && git commit -m "Modified the file identically" && test_tick && git commit -m "Modified the file identically" &&
note C && note C &&


@ -37,7 +40,9 @@ test_expect_success setup '
test_tick && git commit -m "Add another file" && test_tick && git commit -m "Add another file" &&
note D && note D &&


test_tick && git merge -m "merge" master && test_tick &&
test_must_fail git merge -m "merge" master &&
>lost && git commit -a -m "merge" &&
note E && note E &&


echo "Yet another" >elif && echo "Yet another" >elif &&
@ -110,4 +115,16 @@ check_result 'I B A' -- file
check_result 'I B A' --topo-order -- file check_result 'I B A' --topo-order -- file
check_result 'H' --first-parent -- another-file check_result 'H' --first-parent -- another-file


check_result 'E C B A' --full-history E -- lost
test_expect_success 'full history simplification without parent' '
printf "%s\n" E C B A >expect &&
git log --pretty="$FMT" --full-history E -- lost |
unnote >actual &&
sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
test_cmp expect check || {
cat actual
false
}
'

test_done test_done

Loading…
Cancel
Save