Patch 8.2.1808

6 views
Skip to first unread message

Bram Moolenaar

unread,
Oct 7, 2020, 6:59:28 AM10/7/20
to vim...@googlegroups.com

Patch 8.2.1808
Problem: No test coverage for ":spelldump!".
Solution: Add a test. (Dominique Pellé, closes #7089)
Files: src/testdir/test_spell.vim


*** ../vim-8.2.1807/src/testdir/test_spell.vim 2020-09-28 23:13:09.950705432 +0200
--- src/testdir/test_spell.vim 2020-10-07 12:58:02.637940465 +0200
***************
*** 143,148 ****
--- 143,186 ----
%bwipe!
endfunc

+ func Test_spelldump()
+ set spell spelllang=en
+ spellrare! emacs
+
+ spelldump
+
+ " Check assumption about region: 1: us, 2: au, 3: ca, 4: gb, 5: nz.
+ call assert_equal('/regions=usaucagbnz', getline(1))
+ call assert_notequal(0, search('^theater/1$')) " US English only.
+ call assert_notequal(0, search('^theatre/2345$')) " AU, CA, GB or NZ English.
+
+ call assert_notequal(0, search('^emacs/?$')) " ? for a rare word.
+ call assert_notequal(0, search('^the the/!$')) " ! for a wrong word.
+
+ bwipe
+ set spell&
+ endfunc
+
+ func Test_spelldump_bang()
+ new
+ call setline(1, 'This is a sample sentence.')
+ redraw
+ set spell
+ redraw
+ spelldump!
+
+ " :spelldump! includes the number of times a word was found while updating
+ " the screen.
+ " Common word count starts at 10, regular word count starts at 0.
+ call assert_notequal(0, search("^is\t11$")) " common word found once.
+ call assert_notequal(0, search("^the\t10$")) " common word never found.
+ call assert_notequal(0, search("^sample\t1$")) " regular word found once.
+ call assert_equal(0, search("^screen\t")) " regular word never found.
+
+ %bwipe!
+ set spell&
+ endfunc
+
func Test_spelllang_inv_region()
set spell spelllang=en_xx
let messages = GetMessages()
*** ../vim-8.2.1807/src/version.c 2020-10-06 20:46:43.767871541 +0200
--- src/version.c 2020-10-07 12:57:57.445951440 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 1808,
/**/

--
Don't read everything you believe.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages