comparison src/testdir/test_mksession.vim @ 17164:7927cf327396 v8.1.1581

patch 8.1.1581: shared functions for testing are disorganised commit https://github.com/vim/vim/commit/7a39dd7f00239059ce34660611589b26126a550c Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 23 00:50:15 2019 +0200 patch 8.1.1581: shared functions for testing are disorganised Problem: Shared functions for testing are disorganised. Solution: Group finctions in script files. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/4573)
author Bram Moolenaar <Bram@vim.org>
date Sun, 23 Jun 2019 01:00:05 +0200
parents 8e9e9124c7a2
children ea5d6716b82e
comparison
equal deleted inserted replaced
17163:f5a43b78de92 17164:7927cf327396
5 5
6 source check.vim 6 source check.vim
7 CheckFeature mksession 7 CheckFeature mksession
8 8
9 source shared.vim 9 source shared.vim
10 source term_util.vim
10 11
11 func Test_mksession() 12 func Test_mksession()
12 tabnew 13 tabnew
13 let wrap_save = &wrap 14 let wrap_save = &wrap
14 set sessionoptions=buffers splitbelow fileencoding=latin1 15 set sessionoptions=buffers splitbelow fileencoding=latin1
336 call assert_report('unexpected shell line: ' . line) 337 call assert_report('unexpected shell line: ' . line)
337 endif 338 endif
338 endfor 339 endfor
339 call assert_match('terminal ++curwin ++cols=\d\+ ++rows=\d\+\s*.*$', term_cmd) 340 call assert_match('terminal ++curwin ++cols=\d\+ ++rows=\d\+\s*.*$', term_cmd)
340 341
341 call Stop_shell_in_terminal(bufnr('%')) 342 call StopShellInTerminal(bufnr('%'))
342 call delete('Xtest_mks.out') 343 call delete('Xtest_mks.out')
343 endfunc 344 endfunc
344 345
345 func Test_mksession_terminal_no_restore_cmdarg() 346 func Test_mksession_terminal_no_restore_cmdarg()
346 terminal ++norestore 347 terminal ++norestore
351 if line =~ '^terminal' 352 if line =~ '^terminal'
352 call assert_report('session must not restore teminal') 353 call assert_report('session must not restore teminal')
353 endif 354 endif
354 endfor 355 endfor
355 356
356 call Stop_shell_in_terminal(bufnr('%')) 357 call StopShellInTerminal(bufnr('%'))
357 call delete('Xtest_mks.out') 358 call delete('Xtest_mks.out')
358 endfunc 359 endfunc
359 360
360 func Test_mksession_terminal_no_restore_funcarg() 361 func Test_mksession_terminal_no_restore_funcarg()
361 call term_start(&shell, {'norestore': 1}) 362 call term_start(&shell, {'norestore': 1})
366 if line =~ '^terminal' 367 if line =~ '^terminal'
367 call assert_report('session must not restore teminal') 368 call assert_report('session must not restore teminal')
368 endif 369 endif
369 endfor 370 endfor
370 371
371 call Stop_shell_in_terminal(bufnr('%')) 372 call StopShellInTerminal(bufnr('%'))
372 call delete('Xtest_mks.out') 373 call delete('Xtest_mks.out')
373 endfunc 374 endfunc
374 375
375 func Test_mksession_terminal_no_restore_func() 376 func Test_mksession_terminal_no_restore_func()
376 terminal 377 terminal
382 if line =~ '^terminal' 383 if line =~ '^terminal'
383 call assert_report('session must not restore teminal') 384 call assert_report('session must not restore teminal')
384 endif 385 endif
385 endfor 386 endfor
386 387
387 call Stop_shell_in_terminal(bufnr('%')) 388 call StopShellInTerminal(bufnr('%'))
388 call delete('Xtest_mks.out') 389 call delete('Xtest_mks.out')
389 endfunc 390 endfunc
390 391
391 func Test_mksession_terminal_no_ssop() 392 func Test_mksession_terminal_no_ssop()
392 terminal 393 terminal
398 if line =~ '^terminal' 399 if line =~ '^terminal'
399 call assert_report('session must not restore teminal') 400 call assert_report('session must not restore teminal')
400 endif 401 endif
401 endfor 402 endfor
402 403
403 call Stop_shell_in_terminal(bufnr('%')) 404 call StopShellInTerminal(bufnr('%'))
404 call delete('Xtest_mks.out') 405 call delete('Xtest_mks.out')
405 set sessionoptions& 406 set sessionoptions&
406 endfunc 407 endfunc
407 408
408 func Test_mksession_terminal_restore_other() 409 func Test_mksession_terminal_restore_other()
416 let term_cmd = line 417 let term_cmd = line
417 endif 418 endif
418 endfor 419 endfor
419 call assert_match('terminal ++curwin ++cols=\d\+ ++rows=\d\+.*other', term_cmd) 420 call assert_match('terminal ++curwin ++cols=\d\+ ++rows=\d\+.*other', term_cmd)
420 421
421 call Stop_shell_in_terminal(bufnr('%')) 422 call StopShellInTerminal(bufnr('%'))
422 call delete('Xtest_mks.out') 423 call delete('Xtest_mks.out')
423 endfunc 424 endfunc
424 425
425 endif " has('terminal') 426 endif " has('terminal')
426 427