Skip to content

Commit 67f4079

Browse files
committed
Detect a failure in autofill
The failure was not detected before because the command is *supposed* to exit with a non-zero return code.
1 parent a1d1c69 commit 67f4079

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

t/test-conflicted

+10-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ git checkout c
2323
"$GIT_IMERGE" init --name=c-d d
2424
"$GIT_IMERGE" list
2525
"$GIT_IMERGE" diagram --commits --frontier --html=imerge0.html
26-
"$GIT_IMERGE" autofill || true
26+
"$GIT_IMERGE" autofill 2>&1 | tee autofill.out
27+
if grep -q Traceback autofill.out
28+
then
29+
echo 'KNOWN FAILURE!'
30+
fi
2731
"$GIT_IMERGE" diagram --commits --frontier --html=imerge1.html
2832
"$GIT_IMERGE" continue --edit
2933
echo 'cd version' >conflict.txt
@@ -36,7 +40,11 @@ GIT_EDITOR=cat "$GIT_IMERGE" simplify --goal=merge --branch=c-d-merge
3640
"$GIT_IMERGE" remove
3741

3842
git checkout c
39-
"$GIT_IMERGE" start --goal=full --first-parent --name=c-d d || true
43+
"$GIT_IMERGE" start --goal=full --first-parent --name=c-d d 2>&1 | tee start.out
44+
if grep -q Traceback start.out
45+
then
46+
exit 1
47+
fi
4048
"$GIT_IMERGE" diagram --commits --frontier --html=imerge3.html
4149
echo 'cd version' >conflict.txt
4250
git add conflict.txt

0 commit comments

Comments
 (0)