Mercurial > vim
view src/testdir/test_startup_utf8.vim @ 12031:9897241c08b5 v8.0.0896
patch 8.0.0896: cannot close a terminal window when the job ends
commit https://github.com/vim/vim/commit/dd693ce28b158ff573129ee30fe5b886544a03c2
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Aug 10 23:15:19 2017 +0200
patch 8.0.0896: cannot close a terminal window when the job ends
Problem: Cannot automaticlaly close a terminal window when the job ends.
Solution: Add the ++close argument to :term. Add the term_finish option to
term_start(). (Yasuhiro Matsumoto, closes #1950) Also add
++open.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 10 Aug 2017 23:30:05 +0200 |
parents | e84e45786691 |
children | 1e6666885bc0 |
line wrap: on
line source
" Tests for startup using utf-8. if !has('multi_byte') finish endif source shared.vim func Test_read_stdin_utf8() let linesin = ['テスト', '€ÀÈÌÒÙ'] call writefile(linesin, 'Xtestin') let before = [ \ 'set enc=utf-8', \ 'set fencs=cp932,utf-8', \ ] let after = [ \ 'write ++enc=utf-8 Xtestout', \ 'quit!', \ ] if has('win32') let pipecmd = 'type Xtestin | ' else let pipecmd = 'cat Xtestin | ' endif if RunVimPiped(before, after, '-', pipecmd) let lines = readfile('Xtestout') call assert_equal(linesin, lines) else call assert_equal('', 'RunVimPiped failed.') endif call delete('Xtestout') call delete('Xtestin') endfunc func Test_read_fifo_utf8() if !has('unix') return endif " Using bash/zsh's process substitution. if executable('bash') set shell=bash elseif executable('zsh') set shell=zsh else return endif let linesin = ['テスト', '€ÀÈÌÒÙ'] call writefile(linesin, 'Xtestin') let before = [ \ 'set enc=utf-8', \ 'set fencs=cp932,utf-8', \ ] let after = [ \ 'write ++enc=utf-8 Xtestout', \ 'quit!', \ ] if RunVim(before, after, '<(cat Xtestin)') let lines = readfile('Xtestout') call assert_equal(linesin, lines) else call assert_equal('', 'RunVim failed.') endif call delete('Xtestout') call delete('Xtestin') endfunc