Mercurial > vim
diff src/testdir/test_stat.vim @ 21765:08940efa6b4e v8.2.1432
patch 8.2.1432: various inconsistencies in test files
Commit: https://github.com/vim/vim/commit/6d91bcb4d23b5c6a0be72c384beaf385e2d9d606
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 12 18:50:36 2020 +0200
patch 8.2.1432: various inconsistencies in test files
Problem: Various inconsistencies in test files.
Solution: Add modelines where they were missing. Use Check commands instead
of silently skipping over tests. Adjust indents and comments.
(Ken Takata, closes #6695)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 12 Aug 2020 19:00:08 +0200 |
parents | 2ef19eed524a |
children | d7e1cf30728c |
line wrap: on
line diff
--- a/src/testdir/test_stat.vim +++ b/src/testdir/test_stat.vim @@ -1,5 +1,7 @@ " Tests for stat functions and checktime +source check.vim + func CheckFileTime(doSleep) let fnames = ['Xtest1.tmp', 'Xtest2.tmp', 'Xtest3.tmp'] let times = [] @@ -177,12 +179,15 @@ endfunc func Test_win32_symlink_dir() " On Windows, non-admin users cannot create symlinks. " So we use an existing symlink for this test. - if has('win32') - " Check if 'C:\Users\All Users' is a symlink to a directory. - let res = system('dir C:\Users /a') - if match(res, '\C<SYMLINKD> *All Users') >= 0 - " Get the filetype of the symlink. - call assert_equal('dir', getftype('C:\Users\All Users')) - endif + CheckMSWindows + " Check if 'C:\Users\All Users' is a symlink to a directory. + let res = system('dir C:\Users /a') + if match(res, '\C<SYMLINKD> *All Users') >= 0 + " Get the filetype of the symlink. + call assert_equal('dir', getftype('C:\Users\All Users')) + else + throw 'Skipped: cannot find an existing symlink' endif endfunc + +" vim: shiftwidth=2 sts=2 expandtab