summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-04-10 22:22:42 +0200
committerBram Moolenaar <Bram@vim.org>2017-04-10 22:22:42 +0200
commit478af67dd6a9adc456464c3736bda328ae3a28cb (patch)
treecba8ed52ec81c2416324d194c642179536f3e802 /src/testdir
parent451a4a1cb7797e5d9b9fd625671cb5c652e7da00 (diff)
downloadvim-478af67dd6a9adc456464c3736bda328ae3a28cb.zip
patch 8.0.0561: undefined behavior when using backslash after empty line
Problem: Undefined behavior when using backslash after empty line. Solution: Check for an empty line. (Dominique Pelle, closes #1631)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_vimscript.vim11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim
index a299581e8..ce28e82c6 100644
--- a/src/testdir/test_vimscript.vim
+++ b/src/testdir/test_vimscript.vim
@@ -1310,6 +1310,17 @@ func Test_script_lines()
endfunc
"-------------------------------------------------------------------------------
+" Test 96: line continuation {{{1
+"
+" Undefined behavior was detected by ubsan with line continuation
+" after an empty line.
+"-------------------------------------------------------------------------------
+func Test_script_emty_line_continuation()
+
+ \
+endfunc
+
+"-------------------------------------------------------------------------------
" Modelines {{{1
" vim: ts=8 sw=4 tw=80 fdm=marker
" vim: fdt=substitute(substitute(foldtext(),\ '\\%(^+--\\)\\@<=\\(\\s*\\)\\(.\\{-}\\)\:\ \\%(\"\ \\)\\=\\(Test\ \\d*\\)\:\\s*',\ '\\3\ (\\2)\:\ \\1',\ \"\"),\ '\\(Test\\s*\\)\\(\\d\\)\\D\\@=',\ '\\1\ \\2',\ "")