Skip to content

Commit d6b95ad

Browse files
committed
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 <[email protected]>
1 parent f0c7048 commit d6b95ad

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

t/t3701-add-interactive.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,16 @@ test_expect_success 'detect bogus diffFilter output' '
521521
printf y | test_must_fail force_color git add -p
522522
'
523523

524+
test_expect_success 'diff.algorithm is passed to `git diff-files`' '
525+
git reset --hard &&
526+
527+
>file &&
528+
git add file &&
529+
echo changed >file &&
530+
git -c diff.algorithm=bogus add -p 2>err &&
531+
test_i18ngrep "error: option diff-algorithm accepts " err
532+
'
533+
524534
test_expect_success 'patch-mode via -i prompts for files' '
525535
git reset --hard &&
526536

0 commit comments

Comments
 (0)