From: zeertzjq Date: Wed, 4 Feb 2026 17:14:49 +0000 (+0000) Subject: patch 9.1.2131: tests: Test_diff_screen() fails on BSD X-Git-Tag: v9.1.2131^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=991434d8dfe40770f3214e549df16ec3369316a9;p=thirdparty%2Fvim.git patch 9.1.2131: tests: Test_diff_screen() fails on BSD Problem: tests: Test_diff_screen() fails on BSD Solution: Use gdiff on BSD systems if available (zeertzjq). related: #19336 Signed-off-by: zeertzjq Signed-off-by: Christian Brabandt --- diff --git a/runtime/doc/version9.txt b/runtime/doc/version9.txt index 560c573586..52121472a0 100644 --- a/runtime/doc/version9.txt +++ b/runtime/doc/version9.txt @@ -52473,4 +52473,9 @@ Solution: Fix incorrect return value of pagescroll(). Also invert the return value of scroll_with_sms() to be less confusing and match comments (zeertzjq). +Patch 9.1.2131 + +Problem: tests: Test_diff_screen() fails on BSD +Solution: Use gdiff on BSD systems if available (zeertzjq). + vim:tw=78:ts=8:noet:ft=help:norl:fdm=manual:nofoldenable diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim index 5562f5edd5..1a78407565 100644 --- a/src/testdir/test_diffmode.vim +++ b/src/testdir/test_diffmode.vim @@ -992,6 +992,9 @@ func VerifyInternal(buf, dumpfile, extra) endfunc func Test_diff_screen() + if has('bsd') + CheckExecutable gdiff + endif if has('osxdarwin') && system('diff --version') =~ '^Apple diff' throw 'Skipped: unified diff does not work properly on this macOS version' endif @@ -1004,7 +1007,8 @@ func Test_diff_screen() func UnifiedDiffExpr() " Prepend some text to check diff type detection call writefile(['warning', ' message'], v:fname_out) - silent exe '!diff -U0 ' .. v:fname_in .. ' ' .. v:fname_new .. '>>' .. v:fname_out + let diff = has('bsd') ? 'gdiff' : 'diff' + silent exe $'!{diff} -U0 {v:fname_in} {v:fname_new}>>{v:fname_out}' endfunc func SetupUnified() set diffexpr=UnifiedDiffExpr() diff --git a/src/version.c b/src/version.c index 296bb76490..c42ad8c032 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2131, /**/ 2130, /**/