Patch 8.2.0687

4 views
Skip to first unread message

Bram Moolenaar

unread,
May 3, 2020, 10:30:25 AM5/3/20
to vim...@googlegroups.com

Patch 8.2.0687
Problem: Some tests do not work on FreeBSD.
Solution: Enable modeline. Use WaitFor() in more cases. (Ozaki Kiichi,
closes #6036)
Files: src/testdir/test_quickfix.vim, src/testdir/test_terminal.vim


*** ../vim-8.2.0686/src/testdir/test_quickfix.vim 2020-04-26 15:59:51.206952132 +0200
--- src/testdir/test_quickfix.vim 2020-05-03 16:13:15.351401703 +0200
***************
*** 1708,1714 ****
endfunc

func Test_switchbuf()
- CheckNotBSD
call s:create_test_file('Xqftestfile1')
call s:create_test_file('Xqftestfile2')
call s:create_test_file('Xqftestfile3')
--- 1708,1713 ----
***************
*** 1834,1839 ****
--- 1833,1839 ----

" If opening a file changes 'switchbuf', then the new value should be
" retained.
+ set modeline&vim
call writefile(["vim: switchbuf=split"], 'Xqftestfile1')
enew | only
set switchbuf&vim
*** ../vim-8.2.0686/src/testdir/test_terminal.vim 2020-04-30 19:09:31.750196251 +0200
--- src/testdir/test_terminal.vim 2020-05-03 16:24:47.808687415 +0200
***************
*** 894,900 ****
endfunc

func Test_terminal_composing_unicode()
- CheckNotBSD
let save_enc = &encoding
set encoding=utf-8

--- 894,899 ----
***************
*** 909,915 ****
enew
let buf = term_start(cmd, {'curwin': bufnr('')})
let g:job = term_getjob(buf)
! call TermWait(buf, 25)

if has('win32')
call assert_equal('cmd', job_info(g:job).cmd[0])
--- 908,914 ----
enew
let buf = term_start(cmd, {'curwin': bufnr('')})
let g:job = term_getjob(buf)
! call WaitFor({-> term_getline(buf, 1) !=# ''}, 1000)

if has('win32')
call assert_equal('cmd', job_info(g:job).cmd[0])
***************
*** 919,928 ****

" ascii + composing
let txt = "a\u0308bc"
! call term_sendkeys(buf, "echo " . txt . "\r")
call TermWait(buf, 25)
call assert_match("echo " . txt, term_getline(buf, lnum[0]))
! call assert_equal(txt, term_getline(buf, lnum[0] + 1))
let l = term_scrape(buf, lnum[0] + 1)
call assert_equal("a\u0308", l[0].chars)
call assert_equal("b", l[1].chars)
--- 918,928 ----

" ascii + composing
let txt = "a\u0308bc"
! call term_sendkeys(buf, "echo " . txt)
call TermWait(buf, 25)
call assert_match("echo " . txt, term_getline(buf, lnum[0]))
! call term_sendkeys(buf, "\<cr>")
! call WaitForAssert({-> assert_equal(txt, term_getline(buf, lnum[0] + 1))}, 1000)
let l = term_scrape(buf, lnum[0] + 1)
call assert_equal("a\u0308", l[0].chars)
call assert_equal("b", l[1].chars)
***************
*** 930,939 ****

" multibyte + composing
let txt = "\u304b\u3099\u304e\u304f\u3099\u3052\u3053\u3099"
! call term_sendkeys(buf, "echo " . txt . "\r")
call TermWait(buf, 25)
call assert_match("echo " . txt, term_getline(buf, lnum[1]))
! call assert_equal(txt, term_getline(buf, lnum[1] + 1))
let l = term_scrape(buf, lnum[1] + 1)
call assert_equal("\u304b\u3099", l[0].chars)
call assert_equal("\u304e", l[1].chars)
--- 930,940 ----

" multibyte + composing
let txt = "\u304b\u3099\u304e\u304f\u3099\u3052\u3053\u3099"
! call term_sendkeys(buf, "echo " . txt)
call TermWait(buf, 25)
call assert_match("echo " . txt, term_getline(buf, lnum[1]))
! call term_sendkeys(buf, "\<cr>")
! call WaitForAssert({-> assert_equal(txt, term_getline(buf, lnum[1] + 1))}, 1000)
let l = term_scrape(buf, lnum[1] + 1)
call assert_equal("\u304b\u3099", l[0].chars)
call assert_equal("\u304e", l[1].chars)
***************
*** 943,952 ****

" \u00a0 + composing
let txt = "abc\u00a0\u0308"
! call term_sendkeys(buf, "echo " . txt . "\r")
call TermWait(buf, 25)
call assert_match("echo " . txt, term_getline(buf, lnum[2]))
! call assert_equal(txt, term_getline(buf, lnum[2] + 1))
let l = term_scrape(buf, lnum[2] + 1)
call assert_equal("\u00a0\u0308", l[3].chars)

--- 944,954 ----

" \u00a0 + composing
let txt = "abc\u00a0\u0308"
! call term_sendkeys(buf, "echo " . txt)
call TermWait(buf, 25)
call assert_match("echo " . txt, term_getline(buf, lnum[2]))
! call term_sendkeys(buf, "\<cr>")
! call WaitForAssert({-> assert_equal(txt, term_getline(buf, lnum[2] + 1))}, 1000)
let l = term_scrape(buf, lnum[2] + 1)
call assert_equal("\u00a0\u0308", l[3].chars)

*** ../vim-8.2.0686/src/version.c 2020-05-03 16:04:39.605557874 +0200
--- src/version.c 2020-05-03 16:29:20.983637635 +0200
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 687,
/**/

--
Everybody lies, but it doesn't matter since nobody listens.
-- Lieberman's Law

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages