summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-08-31 22:26:53 +0200
committerBram Moolenaar <Bram@vim.org>2018-08-31 22:26:53 +0200
commit9049b686121367941bf534c041975938135c7e20 (patch)
treefc5a2aa594667fb6b9916229a02a605e14ba27b9
parentf13daa46da85a80dd05704cdde0660c2b2651a5a (diff)
patch 8.1.0340: no test for :spellinfov8.1.0340
Problem: No test for :spellinfo. Solution: Add a test. (Dominique Pelle, closes #3394)
-rw-r--r--src/testdir/test_spell.vim29
-rw-r--r--src/version.c2
2 files changed, 31 insertions, 0 deletions
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
index d9d8f6062e..1230c206d9 100644
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -126,6 +126,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",
diff --git a/src/version.c b/src/version.c
index ec13271baf..d5daaf42bf 100644
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 340,
+/**/
339,
/**/
338,