From 08c5a874ab97d52e215025ccd010d68fcdf14731 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 26 Jan 2020 08:17:08 -0500 Subject: vim-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. https://github.com/vim/vim/commit/8f130eda4747e4a4d68353cdb650f359fd01469b --- src/nvim/testdir/test_escaped_glob.vim | 2 +- src/nvim/testdir/test_spell.vim | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_escaped_glob.vim b/src/nvim/testdir/test_escaped_glob.vim index aad3a1e835..2bfd82c296 100644 --- a/src/nvim/testdir/test_escaped_glob.vim +++ b/src/nvim/testdir/test_escaped_glob.vim @@ -17,7 +17,7 @@ function Test_glob() " Setting 'shell' to an invalid name causes a memory leak. sandbox call assert_equal("", glob('Xxx\{')) sandbox call assert_equal("", glob('Xxx\$')) - w! Xxx{ + w! Xxx\{ " } to fix highlighting w! Xxx\$ sandbox call assert_equal("Xxx{", glob('Xxx\{')) diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim index e2016d7927..098cd957ae 100644 --- a/src/nvim/testdir/test_spell.vim +++ b/src/nvim/testdir/test_spell.vim @@ -151,6 +151,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 -- cgit From ad272cd2d7ac6c9d28c2981169b779e146cbb5d6 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sun, 26 Jan 2020 10:21:28 -0500 Subject: vim-patch:8.1.1144: too strict checking of the 'spellfile' option Problem: Too strict checking of the 'spellfile' option. Solution: Allow for a path. https://github.com/vim/vim/commit/862f1e17eaf2b9c6617dfba31d8487cde462658d --- src/nvim/testdir/test_spell.vim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim index 098cd957ae..94789d6ea3 100644 --- a/src/nvim/testdir/test_spell.vim +++ b/src/nvim/testdir/test_spell.vim @@ -392,6 +392,11 @@ func Test_zz_sal_and_addition() call assert_equal("elekwint", SecondSpellWord()) endfunc +func Test_spellfile_value() + set spellfile=Xdir/Xtest.latin1.add + set spellfile=Xdir/Xtest.utf-8.add,Xtest_other.add +endfunc + func Test_region_error() messages clear call writefile(["/regions=usgbnz", "elequint/0"], "Xtest.latin1.add") -- cgit