comparison src/testdir/test_swap.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 647897e6df9e
children 83c2c489cb1b
comparison
equal deleted inserted replaced
21764:476b6faad407 21765:08940efa6b4e
8 return trim(execute('swapname')) 8 return trim(execute('swapname'))
9 endfunc 9 endfunc
10 10
11 " Tests for 'directory' option. 11 " Tests for 'directory' option.
12 func Test_swap_directory() 12 func Test_swap_directory()
13 if !has("unix") 13 CheckUnix
14 return 14
15 endif
16 let content = ['start of testfile', 15 let content = ['start of testfile',
17 \ 'line 2 Abcdefghij', 16 \ 'line 2 Abcdefghij',
18 \ 'line 3 Abcdefghij', 17 \ 'line 3 Abcdefghij',
19 \ 'end of testfile'] 18 \ 'end of testfile']
20 call writefile(content, 'Xtest1') 19 call writefile(content, 'Xtest1')
54 call delete("Xtest2", "rf") 53 call delete("Xtest2", "rf")
55 call delete("Xtest.je", "rf") 54 call delete("Xtest.je", "rf")
56 endfunc 55 endfunc
57 56
58 func Test_swap_group() 57 func Test_swap_group()
59 if !has("unix") 58 CheckUnix
60 return 59
61 endif
62 let groups = split(system('groups')) 60 let groups = split(system('groups'))
63 if len(groups) <= 1 61 if len(groups) <= 1
64 throw 'Skipped: need at least two groups, got ' . string(groups) 62 throw 'Skipped: need at least two groups, got ' . string(groups)
65 endif 63 endif
66 64
376 %bwipe! 374 %bwipe!
377 call delete('Xfile1') 375 call delete('Xfile1')
378 endfunc 376 endfunc
379 377
380 func Test_swap_symlink() 378 func Test_swap_symlink()
381 if !has("unix") 379 CheckUnix
382 return
383 endif
384 380
385 call writefile(['text'], 'Xtestfile') 381 call writefile(['text'], 'Xtestfile')
386 silent !ln -s -f Xtestfile Xtestlink 382 silent !ln -s -f Xtestfile Xtestlink
387 383
388 set dir=. 384 set dir=.