patch 9.0.1604: errors from the codestyle test are a bit confusing
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.
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 1cdeeef..7ad8539 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -111,9 +111,13 @@
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