Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-05-14 02:26:06 +0300
committerJunio C Hamano <gitster@pobox.com>2021-05-14 02:26:06 +0300
commit65c18913deeba4c5f0ca9488b1d8b6757ffc56e1 (patch)
tree96d55f99777aa2bc3446587a0a67d2583f5c88c5 /t
parentdf6c4f722c94641d5a9ea5496511f7043433abc2 (diff)
parent0324e8fc6b297c9e61745dc4e7d110780334157d (diff)
Merge branch 'pw/word-diff-zero-width-matches'
The word-diff mode has been taught to work better with a word regexp that can match an empty string. * pw/word-diff-zero-width-matches: word diff: handle zero length matches
Diffstat (limited to 't')
-rwxr-xr-xt/t4034-diff-words.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t4034-diff-words.sh b/t/t4034-diff-words.sh
index ee7721ab91..561c582d16 100755
--- a/t/t4034-diff-words.sh
+++ b/t/t4034-diff-words.sh
@@ -184,6 +184,11 @@ test_expect_success 'word diff with a regular expression' '
word_diff --color-words="[a-z]+"
'
+test_expect_success 'word diff with zero length matches' '
+ cp expect.letter-runs-are-words expect &&
+ word_diff --color-words="[a-z${LF}]*"
+'
+
test_expect_success 'set up a diff driver' '
git config diff.testdriver.wordRegex "[^[:space:]]" &&
cat <<-\EOF >.gitattributes