Problem: tests: Test_diff_screen() fails on BSD
Solution: Use gdiff on BSD systems if available (zeertzjq).
related: #19336
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
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
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
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()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2131,
/**/
2130,
/**/