aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <janedmundlazo@hotmail.com>2018-09-03 10:40:28 -0400
committerJan Edmund Lazo <janedmundlazo@hotmail.com>2018-11-12 08:45:03 -0500
commit208cdb84a6991bb3652db70b7ac6aea7ab36dcb7 (patch)
treee2021a24a4ef35bd324621fa2f7a3baeead25d88
parent9f3fb66111d3a7923106df60837f3150b3cf55b9 (diff)
downloadrneovim-208cdb84a6991bb3652db70b7ac6aea7ab36dcb7.tar.gz
rneovim-208cdb84a6991bb3652db70b7ac6aea7ab36dcb7.tar.bz2
rneovim-208cdb84a6991bb3652db70b7ac6aea7ab36dcb7.zip
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
-rw-r--r--src/nvim/testdir/test_spell.vim29
1 files changed, 29 insertions, 0 deletions
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",