]> git.ipfire.org Git - thirdparty/git.git/blame - t/t7514-commit-patch.sh
hashmap_put takes "struct hashmap_entry *"
[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
6if ! test_have_prereq PERL
7then
8 skip_all="skipping '$test_description' tests, perl not available"
9 test_done
10fi
11
12test_expect_success 'setup (initial)' '
13 echo line1 >file &&
14 git add file &&
15 git commit -m commit1
16'
17
15048f8a 18test_expect_success 'edit hunk "commit -p -m message"' '
91c9c869
BP
19 test_when_finished "rm -f editor_was_started" &&
20 rm -f editor_was_started &&
21 echo more >>file &&
22 echo e | env GIT_EDITOR=": >editor_was_started" git commit -p -m commit2 file &&
23 test -r editor_was_started
24'
25
15048f8a 26test_expect_success 'edit hunk "commit --dry-run -p -m message"' '
91c9c869
BP
27 test_when_finished "rm -f editor_was_started" &&
28 rm -f editor_was_started &&
29 echo more >>file &&
30 echo e | env GIT_EDITOR=": >editor_was_started" git commit -p -m commit3 file &&
31 test -r editor_was_started
32'
33
34test_done