From: Benoit Pierre Date: Thu, 06 Mar 2014 14:50:19 GMT Subject: [PATCH 1/6] test patch hunk editing with "commit -p -m" Message-ID: <1394117424-29780-2-git-send-email-benoit.pierre@gmail.com> In-Reply-To: <1394117424-29780-1-git-send-email-benoit.pierre@gmail.com> Add (failing) test: with commit changing the environment to let hooks now that no editor will be used (by setting GIT_EDITOR to ":"), the "edit hunk" functionality does not work (no editor is launched and the whole hunk is committed). Signed-off-by: Benoit Pierre --- t/t7513-commit_-p_-m_hunk_edit.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 t/t7513-commit_-p_-m_hunk_edit.sh diff --git a/t/t7513-commit_-p_-m_hunk_edit.sh b/t/t7513-commit_-p_-m_hunk_edit.sh new file mode 100755 index 0000000..e0ad905 --- /dev/null +++ b/t/t7513-commit_-p_-m_hunk_edit.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +test_description='hunk edit with "commit -p -m"' +. ./test-lib.sh + +if ! test_have_prereq PERL +then + skip_all="skipping '$test_description' tests, perl not available" + test_done +fi + +test_expect_success 'setup (initial)' ' + echo line1 >file && + git add file && + git commit -m commit1 + echo line3 >>file +' + +test_expect_success 'setup expected' ' +cat >expected <diff && + test_cmp expected diff +' + +test_done -- 1.9.0