aboutsummaryrefslogtreecommitdiffstats
path: root/t/t4015-diff-whitespace.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-01-14 15:29:31 -0800
committerJunio C Hamano <gitster@pobox.com>2019-01-14 15:29:31 -0800
commit932b867be0cec606ec7355fc25de13ace42f4c71 (patch)
treec1731816dc6bc7dbfc747bc0a5dfd441f0563b57 /t/t4015-diff-whitespace.sh
parent20b3bc155864730380e8186f7d71ee2196a79603 (diff)
parentd173e799ea8fae7d6e4649b763d32d5f0ba82011 (diff)
downloadgit-932b867be0cec606ec7355fc25de13ace42f4c71.tar.gz
Merge branch 'sb/diff-color-moved-config-option-fixup'
Minor inconsistency fix. * sb/diff-color-moved-config-option-fixup: diff: align move detection error handling with other options
Diffstat (limited to 't/t4015-diff-whitespace.sh')
-rwxr-xr-xt/t4015-diff-whitespace.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/t4015-diff-whitespace.sh b/t/t4015-diff-whitespace.sh
index a9fb226c5a..9a3e4fdfec 100755
--- a/t/t4015-diff-whitespace.sh
+++ b/t/t4015-diff-whitespace.sh
@@ -1890,6 +1890,24 @@ test_expect_success 'compare whitespace delta across moved blocks' '
test_cmp expected actual
'
+test_expect_success 'bogus settings in move detection erroring out' '
+ test_must_fail git diff --color-moved=bogus 2>err &&
+ test_i18ngrep "must be one of" err &&
+ test_i18ngrep bogus err &&
+
+ test_must_fail git -c diff.colormoved=bogus diff 2>err &&
+ test_i18ngrep "must be one of" err &&
+ test_i18ngrep "from command-line config" err &&
+
+ test_must_fail git diff --color-moved-ws=bogus 2>err &&
+ test_i18ngrep "possible values" err &&
+ test_i18ngrep bogus err &&
+
+ test_must_fail git -c diff.colormovedws=bogus diff 2>err &&
+ test_i18ngrep "possible values" err &&
+ test_i18ngrep "from command-line config" err
+'
+
test_expect_success 'compare whitespace delta incompatible with other space options' '
test_must_fail git diff \
--color-moved-ws=allow-indentation-change,ignore-all-space \