diff options
Diffstat (limited to 't/t4034-diff-words.sh')
-rwxr-xr-x | t/t4034-diff-words.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t4034-diff-words.sh b/t/t4034-diff-words.sh index 8096d8a337..2647191e7f 100755 --- a/t/t4034-diff-words.sh +++ b/t/t4034-diff-words.sh @@ -331,4 +331,19 @@ test_expect_success '--word-diff=none' ' ' +word_diff_for_language () { + cp "$TEST_DIRECTORY/t4034/$1/pre" \ + "$TEST_DIRECTORY/t4034/$1/post" \ + "$TEST_DIRECTORY/t4034/$1/expect" . && + echo "* diff=$1" >.gitattributes && + word_diff --color-words && cp output output.$1 +} + +for lang_dir in $TEST_DIRECTORY/t4034/*; do + lang=${lang_dir#$TEST_DIRECTORY/t4034/} + test_expect_success "diff driver '$lang' has sane word regex" " + word_diff_for_language $lang + " +done + test_done |