From: Johannes Schindelin via GitGitGadget Date: Fri, 06 Dec 2019 13:08:23 GMT Subject: [PATCH 5/7] t3701: verify that the diff.algorithm config setting is handled Message-ID: <3f219fd789b3cf1c4d9c42b71a175d31df1afeeb.1575637705.git.gitgitgadget@gmail.com> In-Reply-To: From: Johannes Schindelin Without this patch, there is actually no test in Git's test suite that covers the diff.algorithm feature. Let's add one. We do this by passing a bogus value and then expecting `git diff-files` to produce the appropriate error message. Signed-off-by: Johannes Schindelin --- t/t3701-add-interactive.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh index 797610e96d..f43634102e 100755 --- a/t/t3701-add-interactive.sh +++ b/t/t3701-add-interactive.sh @@ -524,6 +524,16 @@ test_expect_success 'detect bogus diffFilter output' ' test_must_fail force_color git add -p file && + git add file && + echo changed >file && + git -c diff.algorithm=bogus add -p 2>err && + test_i18ngrep "error: option diff-algorithm accepts " err +' + test_expect_success 'patch-mode via -i prompts for files' ' git reset --hard && -- gitgitgadget