add-patch: plug a leak handling the '/' command
[alt-git.git] / t / t7514-commit-patch.sh
blobb4de10a5ddac0a2a890adaeb559f1b2afea15bb3
1 #!/bin/sh
3 test_description='hunk edit with "commit -p -m"'
4 . ./test-lib.sh
6 test_expect_success 'setup (initial)' '
7 echo line1 >file &&
8 git add file &&
9 git commit -m commit1
12 test_expect_success 'edit hunk "commit -p -m message"' '
13 test_when_finished "rm -f editor_was_started" &&
14 rm -f editor_was_started &&
15 echo more >>file &&
16 echo e | env GIT_EDITOR=": >editor_was_started" git commit -p -m commit2 file &&
17 test -r editor_was_started
20 test_expect_success 'edit hunk "commit --dry-run -p -m message"' '
21 test_when_finished "rm -f editor_was_started" &&
22 rm -f editor_was_started &&
23 echo more >>file &&
24 echo e | env GIT_EDITOR=": >editor_was_started" git commit -p -m commit3 file &&
25 test -r editor_was_started
28 test_done