From 208cdb84a6991bb3652db70b7ac6aea7ab36dcb7 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 3 Sep 2018 10:40:28 -0400 Subject: [PATCH] vim-patch:8.1.0340: no test for :spellinfo Problem: No test for :spellinfo. Solution: Add a test. (Dominique Pelle, closes vim/vim#3394) https://github.com/vim/vim/commit/9049b686121367941bf534c041975938135c7e20 --- src/nvim/testdir/test_spell.vim | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/nvim/testdir/test_spell.vim b/src/nvim/testdir/test_spell.vim index a2828b21d2..3dbbce83fc 100644 --- a/src/nvim/testdir/test_spell.vim +++ b/src/nvim/testdir/test_spell.vim @@ -85,6 +85,35 @@ func Test_spellreall() bwipe! endfunc +func Test_spellinfo() + new + + set enc=latin1 spell spelllang=en + call assert_match("^\nfile: .*/runtime/spell/en.latin1.spl\n$", execute('spellinfo')) + + set enc=cp1250 spell spelllang=en + call assert_match("^\nfile: .*/runtime/spell/en.ascii.spl\n$", execute('spellinfo')) + + if has('multi_byte') + set enc=utf-8 spell spelllang=en + call assert_match("^\nfile: .*/runtime/spell/en.utf-8.spl\n$", execute('spellinfo')) + endif + + set enc=latin1 spell spelllang=en_us,en_nz + call assert_match("^\n" . + \ "file: .*/runtime/spell/en.latin1.spl\n" . + \ "file: .*/runtime/spell/en.latin1.spl\n$", execute('spellinfo')) + + set spell spelllang= + call assert_fails('spellinfo', 'E756:') + + set nospell spelllang=en + call assert_fails('spellinfo', 'E756:') + + set enc& spell& spelllang& + bwipe +endfunc + func Test_zz_basic() call LoadAffAndDic(g:test_data_aff1, g:test_data_dic1) call RunGoodBad("wrong OK puts. Test the end",