aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-11-06 16:46:23 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-11-06 16:49:17 +0800
commit70843631fe8d2e8e93e6ecf7d08c7824352938b7 (patch)
tree486e1e2d9d5809d5cfc041959c777939c0ef3ef6
parent7add38233e53f9813b50558b00644db669b6b309 (diff)
downloadrneovim-70843631fe8d2e8e93e6ecf7d08c7824352938b7.tar.gz
rneovim-70843631fe8d2e8e93e6ecf7d08c7824352938b7.tar.bz2
rneovim-70843631fe8d2e8e93e6ecf7d08c7824352938b7.zip
vim-patch:8.2.3744: E854 is not tested; some spelling suggestions are not tested
Problem: E854 is not tested; some spelling suggestions are not tested. Solution: Add a couple of tests. (Dominique Pellé, closes vim/vim#9279) https://github.com/vim/vim/commit/f645ee47c85940d05f492a1b3932fbcdfd4204b3 Add missing Test_signcolumn() from patch 7.4.2201. Co-authored-by: Dominique Pelle <dominique.pelle@gmail.com>
-rw-r--r--src/nvim/testdir/test_options.vim14
-rw-r--r--src/nvim/testdir/test_spell.vim5
2 files changed, 19 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim
index 80569bde03..d689ece70d 100644
--- a/src/nvim/testdir/test_options.vim
+++ b/src/nvim/testdir/test_options.vim
@@ -157,6 +157,20 @@ func Test_path_keep_commas()
set path&
endfunc
+func Test_path_too_long()
+ exe 'set path=' .. repeat('x', 10000)
+ call assert_fails('find x', 'E854:')
+ set path&
+endfunc
+
+func Test_signcolumn()
+ CheckFeature signs
+ call assert_equal("auto", &signcolumn)
+ set signcolumn=yes
+ set signcolumn=no
+ call assert_fails('set signcolumn=nope')
+endfunc
+
func Test_filetype_valid()
set ft=valid_name
call assert_equal("valid_name", &filetype)
diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim
index d8495fdb9b..ea18fc5194 100644
--- a/src/nvim/testdir/test_spell.vim
+++ b/src/nvim/testdir/test_spell.vim
@@ -329,6 +329,11 @@ func Test_spellsuggest()
call assert_equal(['Third'], spellsuggest('THird', 1))
call assert_equal(['All'], spellsuggest('ALl', 1))
+ " Special suggestion for repeated 'the the'.
+ call assert_inrange(0, 2, index(spellsuggest('the the', 3), 'the'))
+ call assert_inrange(0, 2, index(spellsuggest('the the', 3), 'the'))
+ call assert_inrange(0, 2, index(spellsuggest('The the', 3), 'The'))
+
call assert_fails("call spellsuggest('maxch', [])", 'E745:')
call assert_fails("call spellsuggest('maxch', 2, [])", 'E745:')