From 1ab08e23b3ba8fed10323ef5572c48413cfa7d96 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 17 Nov 2022 20:18:20 +0800 Subject: vim-patch:8.2.2587: recover test fails on FreeBSD Problem: Recover test fails on FreeBSD. Solution: Check for Linux. https://github.com/vim/vim/commit/6635ae1437e6e343c0514524a8dfb19d9525b908 Co-authored-by: Bram Moolenaar --- src/nvim/testdir/check.vim | 8 ++++++++ src/nvim/testdir/test_recover.vim | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/testdir/check.vim b/src/nvim/testdir/check.vim index 8a1080a2f3..61d3a99a67 100644 --- a/src/nvim/testdir/check.vim +++ b/src/nvim/testdir/check.vim @@ -90,6 +90,14 @@ func CheckUnix() endif endfunc +" Command to check for running on Linux +command CheckLinux call CheckLinux() +func CheckLinux() + if !has('linux') + throw 'Skipped: only works on Linux' + endif +endfunc + " Command to check that making screendumps is supported. " Caller must source screendump.vim command CheckScreendump call CheckScreendump() diff --git a/src/nvim/testdir/test_recover.vim b/src/nvim/testdir/test_recover.vim index c3bdde0d71..60e0fde29e 100644 --- a/src/nvim/testdir/test_recover.vim +++ b/src/nvim/testdir/test_recover.vim @@ -82,8 +82,9 @@ func Test_swap_file() endfunc func Test_nocatch_process_still_running() - " assume Unix means sysinfo.uptime can be used - CheckUnix + " sysinfo.uptime probably only works on Linux + CheckLinux + " the GUI dialog can't be handled CheckNotGui " don't intercept existing swap file here -- cgit