diff src/testdir/test_spell.vim @ 16277:5ef25fa57f71 v8.1.1143

patch 8.1.1143: may pass weird strings to file name expansion commit https://github.com/vim/vim/commit/8f130eda4747e4a4d68353cdb650f359fd01469b Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 10 22:15:19 2019 +0200 patch 8.1.1143: may pass weird strings to file name expansion Problem: May pass weird strings to file name expansion. Solution: Check for matching characters. Disallow control characters.
author Bram Moolenaar <Bram@vim.org>
date Wed, 10 Apr 2019 22:30:06 +0200
parents 2dcaa860e3fc
children 36d97f2a4c2b
line wrap: on
line diff
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -149,6 +149,12 @@ func Test_spellinfo()
   set nospell spelllang=en
   call assert_fails('spellinfo', 'E756:')
 
+  call assert_fails('set spelllang=foo/bar', 'E474:')
+  call assert_fails('set spelllang=foo\ bar', 'E474:')
+  call assert_fails("set spelllang=foo\\\nbar", 'E474:')
+  call assert_fails("set spelllang=foo\\\rbar", 'E474:')
+  call assert_fails("set spelllang=foo+bar", 'E474:')
+
   set enc& spell& spelllang&
   bwipe
 endfunc