diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2019-12-06 16:08:23 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-06 19:57:34 +0300 |
commit | e91162be9ce7195309dc2b7e3c03988481cee850 (patch) | |
tree | 56aed188302f40688f35b7c92bb369d3b8ceb9a4 /t/t3701-add-interactive.sh | |
parent | 0c3222c4f322c586099d2773e180dabf6d4f6568 (diff) |
t3701: verify that the diff.algorithm config setting is handled
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 <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t3701-add-interactive.sh')
-rwxr-xr-x | t/t3701-add-interactive.sh | 10 |
1 files changed, 10 insertions, 0 deletions
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 <y ' +test_expect_success 'diff.algorithm is passed to `git diff-files`' ' + git reset --hard && + + >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 && |