Mercurial > vim
diff src/testdir/test_channel.vim @ 13587:c0ebd15a0908 v8.0.1666
patch 8.0.1666: % argument in ch_log() causes trouble
commit https://github.com/vim/vim/commit/d5359b24ceefefed4b3a37efd9bf54176935f3a5
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 5 22:44:39 2018 +0200
patch 8.0.1666: % argument in ch_log() causes trouble
Problem: % argument in ch_log() causes trouble.
Solution: Use string as third argument in internal ch_log(). (Dominique
Pelle, closes #2784)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 05 Apr 2018 22:45:07 +0200 |
parents | 179586a64f53 |
children | 8723e4496dd1 |
line wrap: on
line diff
--- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -1823,3 +1823,15 @@ func Test_list_args() call s:test_list_args('print("hello\"world\"")', 'hello"world"', 1) call s:test_list_args('print("hello\tworld")', "hello\tworld", 1) endfunc + +" Do this last, it stops any channel log. +func Test_zz_ch_log() + call ch_logfile('Xlog', 'w') + call ch_log('hello there') + call ch_log('%s%s') + call ch_logfile('') + let text = readfile('Xlog') + call assert_match("hello there", text[1]) + call assert_match("%s%s", text[2]) + call delete('Xlog') +endfunc