summaryrefslogtreecommitdiff
path: root/src/testdir/test_swap.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-12 18:50:36 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-12 18:50:36 +0200
commit6d91bcb4d23b5c6a0be72c384beaf385e2d9d606 (patch)
tree0f4129e5f6e049ce5313520239de270cd9389580 /src/testdir/test_swap.vim
parentc3d6e8a46a8fc5de622e8df9dbd25edd03e00c5b (diff)
downloadvim-git-6d91bcb4d23b5c6a0be72c384beaf385e2d9d606.tar.gz
patch 8.2.1432: various inconsistencies in test filesv8.2.1432
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)
Diffstat (limited to 'src/testdir/test_swap.vim')
-rw-r--r--src/testdir/test_swap.vim14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/testdir/test_swap.vim b/src/testdir/test_swap.vim
index 5cd101804..ec998f3f9 100644
--- a/src/testdir/test_swap.vim
+++ b/src/testdir/test_swap.vim
@@ -10,9 +10,8 @@ endfunc
" Tests for 'directory' option.
func Test_swap_directory()
- if !has("unix")
- return
- endif
+ CheckUnix
+
let content = ['start of testfile',
\ 'line 2 Abcdefghij',
\ 'line 3 Abcdefghij',
@@ -56,9 +55,8 @@ func Test_swap_directory()
endfunc
func Test_swap_group()
- if !has("unix")
- return
- endif
+ CheckUnix
+
let groups = split(system('groups'))
if len(groups) <= 1
throw 'Skipped: need at least two groups, got ' . string(groups)
@@ -378,9 +376,7 @@ func Test_swap_prompt_splitwin()
endfunc
func Test_swap_symlink()
- if !has("unix")
- return
- endif
+ CheckUnix
call writefile(['text'], 'Xtestfile')
silent !ln -s -f Xtestfile Xtestlink