Mercurial > vim
view src/testdir/test_listchars.vim @ 14689:796d794cdc88 v8.1.0357
patch 8.1.0357: instructions for tests are outdated
commit https://github.com/vim/vim/commit/02c972153d0f36fd1ae4e7069869f51dc11c6c7d
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 9 15:56:06 2018 +0200
patch 8.1.0357: instructions for tests are outdated
Problem: Instructions for tests are outdated. (Jason Franklin)
Solution: Update the text.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 09 Sep 2018 16:00:08 +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