aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-30 06:26:09 +0800
committerGitHub <noreply@github.com>2024-07-29 22:26:09 +0000
commitd131c48c823c30f519506eddcaef662dad5afa43 (patch)
tree12766f0359583db32dc86e3cd28eeb45233a6342 /test
parent94d42a3e7239a4035ee4429cbd71d5b0162b8289 (diff)
downloadrneovim-d131c48c823c30f519506eddcaef662dad5afa43.tar.gz
rneovim-d131c48c823c30f519506eddcaef662dad5afa43.tar.bz2
rneovim-d131c48c823c30f519506eddcaef662dad5afa43.zip
vim-patch:9.1.0638: E1510 may happen when formatting a message for smsg() (#29907)
Problem: E1510 may happen when formatting a message (after 9.1.0181). Solution: Only give E1510 when using typval. (zeertzjq) closes: vim/vim#15391 https://github.com/vim/vim/commit/0dff31576a340b74cec81517912923c38cb28450
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_spellfile.vim16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/old/testdir/test_spellfile.vim b/test/old/testdir/test_spellfile.vim
index 09b69dd93c..48e46641f4 100644
--- a/test/old/testdir/test_spellfile.vim
+++ b/test/old/testdir/test_spellfile.vim
@@ -846,6 +846,22 @@ func Test_spell_add_word()
%bw!
endfunc
+func Test_spell_add_long_word()
+ set spell spellfile=./Xspellfile.add spelllang=en
+
+ let word = repeat('a', 9000)
+ let v:errmsg = ''
+ " Spell checking doesn't really work for such a long word,
+ " but this should not cause an E1510 error.
+ exe 'spellgood ' .. word
+ call assert_equal('', v:errmsg)
+ call assert_equal([word], readfile('./Xspellfile.add'))
+
+ set spell& spellfile= spelllang& encoding=utf-8
+ call delete('./Xspellfile.add')
+ call delete('./Xspellfile.add.spl')
+endfunc
+
func Test_spellfile_verbose()
call writefile(['1', 'one'], 'XtestVerbose.dic', 'D')
call writefile([], 'XtestVerbose.aff', 'D')