Skip to content

Commit f45938c

Browse files
committed
patch 8.0.1243: no test for what 8.0.1227 fixes
Problem: No test for what 8.0.1227 fixes. Solution: Add a test that triggers the problem. (Christian Brabandt)
1 parent ffd99f7 commit f45938c

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

src/testdir/test_normal.vim

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,13 @@ func! Test_normal19_z_spell()
12081208
call assert_match("Word 'goood' added to ./Xspellfile2.add", a)
12091209
call assert_equal('goood', cnt[0])
12101210

1211+
" Test for :spellgood!
1212+
let temp = execute(':spe!0/0')
1213+
call assert_match('Invalid region', temp)
1214+
let spellfile = matchstr(temp, 'Invalid region nr in \zs.*\ze line \d: 0')
1215+
call assert_equal(['# goood', '# goood/!', '#oood', '0/0'], readfile(spellfile))
1216+
call delete(spellfile)
1217+
12111218
" clean up
12121219
exe "lang" oldlang
12131220
call delete("./Xspellfile.add")

src/testdir/test_search.vim

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,3 +567,18 @@ func Test_search_cmdline_incsearch_highlight_attr()
567567

568568
bwipe!
569569
endfunc
570+
571+
func Test_search_undefined_behaviour()
572+
if !has("terminal")
573+
return
574+
endif
575+
let h = winheight(0)
576+
if h < 3
577+
return
578+
endif
579+
" did cause an undefined left shift
580+
let g:buf = term_start([GetVimProg(), '--clean', '-e', '-s', '-c', 'call search(getline("."))', 'samples/test000'], {'term_rows': 3})
581+
call assert_equal([''], getline(1, '$'))
582+
call term_sendkeys(g:buf, ":qa!\<cr>")
583+
bwipe!
584+
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1243,
764766
/**/
765767
1242,
766768
/**/

0 commit comments

Comments
 (0)