@matheusbsbs / matheus-bagliano / commits / e91162be9c
Fork 0

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>

Johannes Schindelin committed Dec 6, 2019 at 13:08 UTC e91162be9ce7195309dc2b7e3c03988481cee850
1 file changed +10
t/t3701-add-interactive.sh
+10
@@ -524,6 +524,16 @@ test_expect_success 'detect bogus diffFilter output' '
524 test_must_fail force_color git add -p <y
525 '
526
527 +test_expect_success 'diff.algorithm is passed to `git diff-files`' '
528 + git reset --hard &&
529 +
530 + >file &&
531 + git add file &&
532 + echo changed >file &&
533 + git -c diff.algorithm=bogus add -p 2>err &&
534 + test_i18ngrep "error: option diff-algorithm accepts " err
535 +'
536 +
537 test_expect_success 'patch-mode via -i prompts for files' '
538 git reset --hard &&
539