aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_stat.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-11-18 12:35:21 +0100
committerGitHub <noreply@github.com>2018-11-18 12:35:21 +0100
commit00e3ba22fe8c36cd53aa1b398d09b0af1fcbbcb0 (patch)
treec6e6ab411eeda4f63759e3fd27b9e2e2c2caf639 /src/nvim/testdir/test_stat.vim
parent25356f2802b5b98efe7f0d6661979b0a919c4d2d (diff)
parentf4b4b7c1326cd599b08c78981b032a75ae1faaa7 (diff)
downloadrneovim-00e3ba22fe8c36cd53aa1b398d09b0af1fcbbcb0.tar.gz
rneovim-00e3ba22fe8c36cd53aa1b398d09b0af1fcbbcb0.tar.bz2
rneovim-00e3ba22fe8c36cd53aa1b398d09b0af1fcbbcb0.zip
Merge #9247 'vim-patch:8.1.{258,298,299,318,376}'
Diffstat (limited to 'src/nvim/testdir/test_stat.vim')
-rw-r--r--src/nvim/testdir/test_stat.vim18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_stat.vim b/src/nvim/testdir/test_stat.vim
index c276df0a92..74b76d668e 100644
--- a/src/nvim/testdir/test_stat.vim
+++ b/src/nvim/testdir/test_stat.vim
@@ -141,17 +141,29 @@ func Test_getftype()
endif
for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null')
- call assert_equal('cdev', getftype(cdevfile))
+ let type = getftype(cdevfile)
+ " ignore empty result, can happen if the file disappeared
+ if type != ''
+ call assert_equal('cdev', type)
+ endif
endfor
for bdevfile in systemlist('find /dev -type b -maxdepth 2 2>/dev/null')
- call assert_equal('bdev', getftype(bdevfile))
+ let type = getftype(bdevfile)
+ " ignore empty result, can happen if the file disappeared
+ if type != ''
+ call assert_equal('bdev', type)
+ endif
endfor
" The /run/ directory typically contains socket files.
" If it does not, test won't fail but will not test socket files.
for socketfile in systemlist('find /run -type s -maxdepth 2 2>/dev/null')
- call assert_equal('socket', getftype(socketfile))
+ let type = getftype(socketfile)
+ " ignore empty result, can happen if the file disappeared
+ if type != ''
+ call assert_equal('socket', type)
+ endif
endfor
" TODO: file type 'other' is not tested. How can we test it?