t6012: update test for tweaked full-history traversal

Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed May 16, 2013 at 18:32 UTC d5d2fc8b1a2afdd086b194b2a834e896367d6713
1 file changed +23 -6
t/t6012-rev-list-simplify.sh
+23 -6
@@ -14,21 +14,24 @@ unnote () {
14
15 test_expect_success setup '
16 echo "Hi there" >file &&
17 - git add file &&
18 - test_tick && git commit -m "Initial file" &&
17 + echo "initial" >lost &&
18 + git add file lost &&
19 + test_tick && git commit -m "Initial file and lost" &&
20 note A &&
21
22 git branch other-branch &&
23
24 echo "Hello" >file &&
24 - git add file &&
25 - test_tick && git commit -m "Modified file" &&
25 + echo "second" >lost &&
26 + git add file lost &&
27 + test_tick && git commit -m "Modified file and lost" &&
28 note B &&
29
30 git checkout other-branch &&
31
32 echo "Hello" >file &&
31 - git add file &&
33 + >lost &&
34 + git add file lost &&
35 test_tick && git commit -m "Modified the file identically" &&
36 note C &&
37
@@ -37,7 +40,9 @@ test_expect_success setup '
40 test_tick && git commit -m "Add another file" &&
41 note D &&
42
40 - test_tick && git merge -m "merge" master &&
43 + test_tick &&
44 + test_must_fail git merge -m "merge" master &&
45 + >lost && git commit -a -m "merge" &&
46 note E &&
47
48 echo "Yet another" >elif &&
@@ -110,4 +115,16 @@ check_result 'I B A' -- file
115 check_result 'I B A' --topo-order -- file
116 check_result 'H' --first-parent -- another-file
117
118 +check_result 'E C B A' --full-history E -- lost
119 +test_expect_success 'full history simplification without parent' '
120 + printf "%s\n" E C B A >expect &&
121 + git log --pretty="$FMT" --full-history E -- lost |
122 + unnote >actual &&
123 + sed -e "s/^.* \([^ ]*\) .*/\1/" >check <actual &&
124 + test_cmp expect check || {
125 + cat actual
126 + false
127 + }
128 +'
129 +
130 test_done