]>
Commit | Line | Data |
---|---|---|
91c9c869 BP |
1 | #!/bin/sh |
2 | ||
3 | test_description='hunk edit with "commit -p -m"' | |
4 | . ./test-lib.sh | |
5 | ||
91c9c869 BP |
6 | test_expect_success 'setup (initial)' ' |
7 | echo line1 >file && | |
8 | git add file && | |
9 | git commit -m commit1 | |
10 | ' | |
11 | ||
15048f8a | 12 | test_expect_success 'edit hunk "commit -p -m message"' ' |
91c9c869 BP |
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 | |
18 | ' | |
19 | ||
15048f8a | 20 | test_expect_success 'edit hunk "commit --dry-run -p -m message"' ' |
91c9c869 BP |
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 | |
26 | ' | |
27 | ||
28 | test_done |