summaryrefslogtreecommitdiffstats
path: root/src/testdir/runtest.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-06-04 16:55:27 +0100
committerBram Moolenaar <Bram@vim.org>2023-06-04 16:55:27 +0100
commitabc8130d6a680026ffb2cc36b74d239e88f775d6 (patch)
treec3b596b8e36e39447405006701b10d7a48ec7ba0 /src/testdir/runtest.vim
parent3c802277604a6b21110e41bedfe4c937ba7c2b7d (diff)
patch 9.0.1604: errors from the codestyle test are a bit confusingv9.0.1604
Problem: Errors from the codestyle test are a bit confusing. Solution: Use assert_report() with a clearer message. Avoid a warning for an existing swap file.
Diffstat (limited to 'src/testdir/runtest.vim')
-rw-r--r--src/testdir/runtest.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 1cdeeef5aa..7ad8539c93 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -111,9 +111,13 @@ if has("win32")
else
let s:test_script_fname = expand('%')
endif
+
au! SwapExists * call HandleSwapExists()
func HandleSwapExists()
if exists('g:ignoreSwapExists')
+ if type(g:ignoreSwapExists) == v:t_string
+ let v:swapchoice = g:ignoreSwapExists
+ endif
return
endif
" Ignore finding a swap file for the test script (the user might be