Patch 8.2.5098
Problem: Spelldump test sometimes hangs.
Solution: Catch the problem of the spell file not being found to avoid
hanging in the download dialog.
Files: src/testdir/test_spell.vim
*** ../vim-8.2.5097/src/testdir/test_spell.vim 2022-05-08 22:43:47.490988302 +0100
--- src/testdir/test_spell.vim 2022-06-15 16:53:21.647319704 +0100
***************
*** 137,142 ****
--- 137,146 ----
augroup END
call assert_fails('set spell spelllang=ab_cd', 'E797:')
+ " clean up
+ augroup TestSpellFileMissing
+ autocmd! SpellFileMissing
+ augroup END
augroup! TestSpellFileMissing
unlet s:spell_file_missing
set spell& spelllang&
***************
*** 144,162 ****
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
--- 148,181 ----
endfunc
func Test_spelldump()
+ " In case the spell file is not found avoid getting the download dialog, we
+ " would get stuck at the prompt.
+ let g:en_not_found = 0
+ augroup TestSpellFileMissing
+ au! SpellFileMissing * let g:en_not_found = 1
+ augroup END
set spell spelllang=en
spellrare! emacs
! if g:en_not_found
! call assert_report("Could not find English spell file")
! else
! 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.
! endif
!
! " clean up
! unlet g:en_not_found
! augroup TestSpellFileMissing
! autocmd! SpellFileMissing
! augroup END
! augroup! TestSpellFileMissing
bwipe
set spell&
endfunc
***************
*** 165,182 ****
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
--- 184,220 ----
new
call setline(1, 'This is a sample sentence.')
redraw
! " In case the spell file is not found avoid getting the download dialog, we
! " would get stuck at the prompt.
! let g:en_not_found = 0
! augroup TestSpellFileMissing
! au! SpellFileMissing * let g:en_not_found = 1
! augroup END
+ set spell
+
+ if g:en_not_found
+ call assert_report("Could not find English spell file")
+ else
+ 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.
+ endif
+
+ " clean up
+ unlet g:en_not_found
+ augroup TestSpellFileMissing
+ autocmd! SpellFileMissing
+ augroup END
+ augroup! TestSpellFileMissing
%bwipe!
set spell&
endfunc
*** ../vim-8.2.5097/src/version.c 2022-06-15 12:12:40.974209103 +0100
--- src/version.c 2022-06-15 16:54:22.619207172 +0100
***************
*** 736,737 ****
--- 736,739 ----
{ /* Add new patch number below this line */
+ /**/
+ 5098,
/**/
--
ARTHUR: CHARGE!
[The mighty ARMY charges. Thundering noise of feet. Clatter of coconuts.
Shouts etc. Suddenly there is a wail of a siren and a couple of police
cars roar round in front of the charging ARMY and the POLICE leap out and
stop them. TWO POLICEMAN and the HISTORIAN'S WIFE. Black Marias skid up
behind them.]
HISTORIAN'S WIFE: They're the ones, I'm sure.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///