Mercurial > vim
view src/testdir/test_listchars.vim @ 14345:72afa7268670 v8.1.0188
patch 8.1.0188: no test for ":cscope add"
commit https://github.com/vim/vim/commit/2196bca7377ff245866cc3cee65b0adb48432ac3
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 15 17:36:32 2018 +0200
patch 8.1.0188: no test for ":cscope add"
Problem: No test for ":cscope add".
Solution: Add a test. (Dominique Pelle, closes https://github.com/vim/vim/issues/3212)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 15 Jul 2018 17:45:05 +0200 |
parents | 90aaa974594e |
children | bc17a9d37810 |
line wrap: on
line source
" Tests for 'listchars' display with 'list' and :list source view_util.vim func Test_listchars() enew! set ff=unix set list set listchars+=tab:>-,space:.,trail:< call append(0, [ \ ' aa ', \ ' bb ', \ ' cccc ', \ 'dd ee ', \ ' ' \ ]) let expected = [ \ '>-------aa>-----$', \ '..bb>---<<$', \ '...cccc><$', \ 'dd........ee<<>-$', \ '<$' \ ] redraw! for i in range(1, 5) call cursor(i, 1) call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$'))) endfor set listchars-=trail:< let expected = [ \ '>-------aa>-----$', \ '..bb>---..$', \ '...cccc>.$', \ 'dd........ee..>-$', \ '.$' \ ] redraw! for i in range(1, 5) call cursor(i, 1) call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$'))) endfor set listchars+=trail:< set nolist normal ggdG call append(0, [ \ ' fff ', \ ' gg ', \ ' h ', \ 'iii ', \ ]) let l = split(execute("%list"), "\n") call assert_equal([ \ '..fff>--<<$', \ '>-------gg>-----$', \ '.....h>-$', \ 'iii<<<<><<$', '$'], l) enew! set listchars& ff& endfunc