Skip to content

Commit 71fc224

Browse files
committed
t3402: test "rebase -s<strategy> -X<opt>"
Signed-off-by: Junio C Hamano <[email protected]>
1 parent f772c34 commit 71fc224

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

t/t3402-rebase-merge.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,25 @@ test_expect_success 'picking rebase' '
117117
esac
118118
'
119119

120+
test_expect_success 'rebase -s funny -Xopt' '
121+
test_when_finished "rm -fr test-bin funny.was.run" &&
122+
mkdir test-bin &&
123+
cat >test-bin/git-merge-funny <<-EOF &&
124+
#!$SHELL_PATH
125+
case "\$1" in --opt) ;; *) exit 2 ;; esac
126+
shift &&
127+
>funny.was.run &&
128+
exec git merge-recursive "\$@"
129+
EOF
130+
chmod +x test-bin/git-merge-funny &&
131+
git reset --hard &&
132+
git checkout -b test-funny master^ &&
133+
test_commit funny &&
134+
(
135+
PATH=./test-bin:$PATH
136+
git rebase -s funny -Xopt master
137+
) &&
138+
test -f funny.was.run
139+
'
140+
120141
test_done

0 commit comments

Comments
 (0)