Merge branch 'ja/doc-synopsis-markup'
[git/gitster.git] / t / t7514-commit-patch.sh
blob03ba0c0e734e9b7ecc3ba4ac944af8fa83cd925a
1 #!/bin/sh
3 test_description='hunk edit with "commit -p -m"'
5 TEST_PASSES_SANITIZE_LEAK=true
6 . ./test-lib.sh
8 test_expect_success 'setup (initial)' '
9 echo line1 >file &&
10 git add file &&
11 git commit -m commit1
14 test_expect_success 'edit hunk "commit -p -m message"' '
15 test_when_finished "rm -f editor_was_started" &&
16 rm -f editor_was_started &&
17 echo more >>file &&
18 echo e | env GIT_EDITOR=": >editor_was_started" git commit -p -m commit2 file &&
19 test -r editor_was_started
22 test_expect_success 'edit hunk "commit --dry-run -p -m message"' '
23 test_when_finished "rm -f editor_was_started" &&
24 rm -f editor_was_started &&
25 echo more >>file &&
26 echo e | env GIT_EDITOR=": >editor_was_started" git commit -p -m commit3 file &&
27 test -r editor_was_started
30 test_done