From 656be8a591a1fa1cba1de1a2128944d6a684cc7d Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 28 Aug 2023 07:16:15 +0800 Subject: vim-patch:9.0.1810: camel-case spelling has issues with digits (#24909) Problem: camel-case spelling has issues with digits Solution: Improve the camCase spell checking by taking digits and caps into account Rewrite the conditions to check for word boundaries by taking into account the presence of digits and all-caps sequences such as acronyms. closes: vim/vim#12644 closes: vim/vim#12933 https://github.com/vim/vim/commit/d08745040bb82c5e9a81b6c8a414e50951642492 Co-authored-by: LemonBoy --- test/old/testdir/test_spell.vim | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test') diff --git a/test/old/testdir/test_spell.vim b/test/old/testdir/test_spell.vim index aeb61a0e33..b2fc40ee08 100644 --- a/test/old/testdir/test_spell.vim +++ b/test/old/testdir/test_spell.vim @@ -131,6 +131,26 @@ foobar/? set spell& endfunc +func Test_spell_camelcase() + set spell spelloptions=camel + let words = [ + \ 'UPPER', + \ 'lower', + \ 'mixedCase', + \ 'HTML', + \ 'XMLHttpRequest', + \ 'foo123bar', + \ '12345678', + \ 'HELLO123world', + \] + + for word in words + call assert_equal(['', ''], spellbadword(word)) + endfor + + set spell& spelloptions& +endfunc + func Test_spell_file_missing() let s:spell_file_missing = 0 augroup TestSpellFileMissing -- cgit