]> granicus.if.org Git - vim/commitdiff
patch 8.2.3744: E854 is not tested; some spelling suggestions are not tested v8.2.3744
authorDominique Pelle <dominique.pelle@gmail.com>
Sun, 5 Dec 2021 13:21:18 +0000 (13:21 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 5 Dec 2021 13:21:18 +0000 (13:21 +0000)
Problem:    E854 is not tested; some spelling suggestions are not tested.
Solution:   Add a couple of tests. (Dominique PellĂ©, closes #9279)

src/testdir/test_options.vim
src/testdir/test_spell.vim
src/version.c

index 585b1996730cba47c31128acdf63530d28bf140b..6fc45642241a775a842a55568739c6f05032adf5 100644 (file)
@@ -136,6 +136,12 @@ 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)
index b7437fd448011fc33d33aa413f308d42263f569f..3c32450c241c9c3ccb18c5147cf6cb3b55bfb7a3 100644 (file)
@@ -267,6 +267,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:')
 
index cd7a964022cbe58cd8a93219eae332db9caf38c7..da1bc2dfd92eaac36bd27da0e9adeede14e94c61 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3744,
 /**/
     3743,
 /**/