]> git.ipfire.org Git - thirdparty/git.git/blame - t/t7514-commit-patch.sh
The fifteenth batch
[thirdparty/git.git] / t / t7514-commit-patch.sh
CommitLineData
91c9c869
BP
1#!/bin/sh
2
3test_description='hunk edit with "commit -p -m"'
4. ./test-lib.sh
5
91c9c869
BP
6test_expect_success 'setup (initial)' '
7 echo line1 >file &&
8 git add file &&
9 git commit -m commit1
10'
11
15048f8a 12test_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 20test_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
28test_done