Skip to content

Commit

Permalink
patch 8.0.0112
Browse files Browse the repository at this point in the history
Problem:    Tests 92 and 93 are old style.
Solution:   Make test92 and test93 new style. (Hirohito Higashi, closes #1289)
  • Loading branch information
brammool committed Dec 1, 2016
1 parent eebd84e commit eca626f
Show file tree
Hide file tree
Showing 10 changed files with 216 additions and 152 deletions.
4 changes: 3 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2052,7 +2052,7 @@ test1 \
test60 test64 test65 test66 test67 test68 test69 \
test70 test72 test73 test74 test75 test77 test78 test79 \
test80 test82 test83 test84 test85 test86 test87 test88 test89 \
test90 test91 test92 test93 test94 test95 test97 test98 test99 \
test90 test91 test94 test95 test97 test98 test99 \
test100 test101 test103 test104 test107 test108:
cd testdir; rm -f $@.out; $(MAKE) -f Makefile $@.out VIMPROG=../$(VIMTARGET) $(GUI_TESTARG) SCRIPTSOURCE=../$(SCRIPTSOURCE)

Expand Down Expand Up @@ -2118,6 +2118,8 @@ test_arglist \
test_matchadd_conceal_utf8 \
test_menu \
test_messages \
test_mksession \
test_mksession_utf8 \
test_nested_function \
test_netbeans \
test_normal \
Expand Down
4 changes: 2 additions & 2 deletions src/testdir/Make_all.mak
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ SCRIPTS_ALL = \
test88.out \
test90.out \
test91.out \
test92.out \
test93.out \
test94.out \
test95.out \
test98.out \
Expand Down Expand Up @@ -167,6 +165,8 @@ NEW_TESTS = test_arglist.res \
test_man.res \
test_marks.res \
test_matchadd_conceal.res \
test_mksession.res \
test_mksession_utf8.res \
test_nested_function.res \
test_netbeans.res \
test_normal.res \
Expand Down
2 changes: 1 addition & 1 deletion src/testdir/Make_vms.mms
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ SCRIPT = test1.out test3.out test4.out test5.out \
test72.out test75.out \
test77a.out test78.out test79.out test80.out \
test82.out test84.out test88.out test89.out \
test90.out test91.out test92.out test93.out test94.out \
test90.out test91.out test94.out \
test95.out test98.out test99.out \
test103.out test104.out \
test107.out test108.out\
Expand Down
48 changes: 0 additions & 48 deletions src/testdir/test92.in

This file was deleted.

26 changes: 0 additions & 26 deletions src/testdir/test92.ok

This file was deleted.

48 changes: 0 additions & 48 deletions src/testdir/test93.in

This file was deleted.

26 changes: 0 additions & 26 deletions src/testdir/test93.ok

This file was deleted.

104 changes: 104 additions & 0 deletions src/testdir/test_mksession.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
" Test for :mksession, :mkview and :loadview in latin1 encoding

set encoding=latin1
scriptencoding latin1

if !has('multi_byte') || !has('mksession')
finish
endif

func Test_mksession()
tabnew
let wrap_save = &wrap
set sessionoptions=buffers splitbelow fileencoding=latin1
call setline(1, [
\ 'start:',
\ 'no multibyte chAracter',
\ ' one leaDing tab',
\ ' four leadinG spaces',
\ 'two consecutive tabs',
\ 'two tabs in one line',
\ 'one ä multibyteCharacter',
\ 'aä Ä two multiByte characters',
\ 'Aäöü three mulTibyte characters'
\ ])
let tmpfile = tempname()
exec 'w! ' . tmpfile
/^start:
set wrap
vsplit
norm! j16|
split
norm! j16|
split
norm! j16|
split
norm! j8|
split
norm! j8|
split
norm! j16|
split
norm! j16|
split
norm! j16|
wincmd l

set nowrap
/^start:
norm! j16|3zl
split
norm! j016|3zl
split
norm! j016|3zl
split
norm! j08|3zl
split
norm! j08|3zl
split
norm! j016|3zl
split
norm! j016|3zl
split
norm! j016|3zl
split
call wincol()
mksession! test_mks.out
let li = filter(readfile('test_mks.out'), 'v:val =~# "\\(^ *normal! 0\\|^ *exe ''normal!\\)"')
let expected = [
\ 'normal! 016|',
\ 'normal! 016|',
\ 'normal! 016|',
\ 'normal! 08|',
\ 'normal! 08|',
\ 'normal! 016|',
\ 'normal! 016|',
\ 'normal! 016|',
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
\ " normal! 016|",
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
\ " normal! 016|",
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
\ " normal! 016|",
\ " exe 'normal! ' . s:c . '|zs' . 8 . '|'",
\ " normal! 08|",
\ " exe 'normal! ' . s:c . '|zs' . 8 . '|'",
\ " normal! 08|",
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
\ " normal! 016|",
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
\ " normal! 016|",
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
\ " normal! 016|",
\ " exe 'normal! ' . s:c . '|zs' . 16 . '|'",
\ " normal! 016|"
\ ]
call assert_equal(expected, li)
tabclose!

call delete('test_mks.out')
call delete(tmpfile)
let &wrap = wrap_save
endfunc

" vim: shiftwidth=2 sts=2 expandtab
Loading

0 comments on commit eca626f

Please sign in to comment.