aboutsummaryrefslogtreecommitdiff
path: root/test/old
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-08-28 07:16:15 +0800
committerGitHub <noreply@github.com>2023-08-28 07:16:15 +0800
commit656be8a591a1fa1cba1de1a2128944d6a684cc7d (patch)
tree9b11420f17c51e6bb12ab27f2e4ee45ca2cb2d0c /test/old
parent6b12eda2201706dbc4705b6e3ca9b17821051e58 (diff)
downloadrneovim-656be8a591a1fa1cba1de1a2128944d6a684cc7d.tar.gz
rneovim-656be8a591a1fa1cba1de1a2128944d6a684cc7d.tar.bz2
rneovim-656be8a591a1fa1cba1de1a2128944d6a684cc7d.zip
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 <thatlemon@gmail.com>
Diffstat (limited to 'test/old')
-rw-r--r--test/old/testdir/test_spell.vim20
1 files changed, 20 insertions, 0 deletions
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