diff src/testdir/test_spell.vim @ 12694:514c1741ab8c v8.0.1225

patch 8.0.1225: no check for spell region being zero commit https://github.com/vim/vim/commit/ee03b941241eae1d36bc29b84eec09116cefe7cd Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 27 00:57:05 2017 +0200 patch 8.0.1225: no check for spell region being zero Problem: No check for spell region being zero. (geeknik) Solution: Check for zero. (closes https://github.com/vim/vim/issues/2252)
author Christian Brabandt <cb@256bit.org>
date Fri, 27 Oct 2017 01:00:06 +0200
parents b276c1e73c27
children 3dd37eec73f0
line wrap: on
line diff
--- a/src/testdir/test_spell.vim
+++ b/src/testdir/test_spell.vim
@@ -271,6 +271,15 @@ func Test_zz_sal_and_addition()
   call assert_equal("elekwint", SecondSpellWord())
 endfunc
 
+func Test_region_error()
+  messages clear
+  call writefile(["/regions=usgbnz", "elequint/0"], "Xtest.latin1.add")
+  mkspell! Xtest.latin1.add.spl Xtest.latin1.add
+  call assert_match('Invalid region nr in Xtest.latin1.add line 2: 0', execute('messages'))
+  call delete('Xtest.latin1.add')
+  call delete('Xtest.latin1.add.spl')
+endfunc
+
 " Check using z= in new buffer (crash fixed by patch 7.4a.028).
 func Test_zeq_crash()
   new