Mercurial > vim
comparison src/testdir/test_writefile.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 | 93dae47699fb |
children | e0af4660dfc7 |
comparison
equal
deleted
inserted
replaced
21764:476b6faad407 | 21765:08940efa6b4e |
---|---|
41 | 41 |
42 call assert_fails('call writefile([], [])', 'E730:') | 42 call assert_fails('call writefile([], [])', 'E730:') |
43 endfunc | 43 endfunc |
44 | 44 |
45 func Test_writefile_fails_conversion() | 45 func Test_writefile_fails_conversion() |
46 if !has('iconv') || has('sun') | 46 CheckFeature iconv |
47 return | 47 if has('sun') |
48 throw 'Skipped: does not work on SunOS' | |
48 endif | 49 endif |
49 " Without a backup file the write won't happen if there is a conversion | 50 " Without a backup file the write won't happen if there is a conversion |
50 " error. | 51 " error. |
51 set nobackup nowritebackup backupdir=. backupskip= | 52 set nobackup nowritebackup backupdir=. backupskip= |
52 new | 53 new |
61 bwipe! | 62 bwipe! |
62 set backup& writebackup& backupdir&vim backupskip&vim | 63 set backup& writebackup& backupdir&vim backupskip&vim |
63 endfunc | 64 endfunc |
64 | 65 |
65 func Test_writefile_fails_conversion2() | 66 func Test_writefile_fails_conversion2() |
66 if !has('iconv') || has('sun') | 67 CheckFeature iconv |
67 return | 68 if has('sun') |
69 throw 'Skipped: does not work on SunOS' | |
68 endif | 70 endif |
69 " With a backup file the write happens even if there is a conversion error, | 71 " With a backup file the write happens even if there is a conversion error, |
70 " but then the backup file must remain | 72 " but then the backup file must remain |
71 set nobackup writebackup backupdir=. backupskip= | 73 set nobackup writebackup backupdir=. backupskip= |
72 let contents = ["line one", "line two"] | 74 let contents = ["line one", "line two"] |