diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_listchars.vim | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/test/old/testdir/test_listchars.vim b/test/old/testdir/test_listchars.vim index 8037abfd91..7965838671 100644 --- a/test/old/testdir/test_listchars.vim +++ b/test/old/testdir/test_listchars.vim @@ -678,6 +678,7 @@ func Test_listchars_precedes_with_wide_char() call setline(1, '123口456') call assert_equal(['123口456$ '], ScreenLines(1, 10)) let attr = screenattr(1, 9) + normal! zl call assert_equal(['!3口456$ '], ScreenLines(1, 10)) call assert_equal(attr, screenattr(1, 1)) @@ -689,8 +690,7 @@ func Test_listchars_precedes_with_wide_char() call assert_equal(attr, screenattr(1, 1)) call assert_equal(attr, screenattr(1, 2)) normal! zl - " TODO: should it be '!' instead of '<' here? - call assert_equal(['<456$ '], ScreenLines(1, 10)) + call assert_equal(['!456$ '], ScreenLines(1, 10)) call assert_equal(attr, screenattr(1, 1)) normal! zl call assert_equal(['!56$ '], ScreenLines(1, 10)) @@ -702,4 +702,25 @@ func Test_listchars_precedes_with_wide_char() bw! endfunc +func Test_listchars_precedes_with_tab() + new + setlocal nowrap list listchars=eol:$,precedes:!,tab:<-> + call setline(1, "1234\t56") + let expected_line = '1234<-->56$ ' + call assert_equal([expected_line], ScreenLines(1, 12)) + let expected_attrs = mapnew(range(1, 12), 'screenattr(1, v:val)') + let attr = expected_attrs[-2] + + for i in range(8) + normal! zl + let expected_line = '!' .. expected_line[2:] .. ' ' + let expected_attrs = [attr] + expected_attrs[2:] + expected_attrs[-1:] + call assert_equal([expected_line], ScreenLines(1, 12)) + let attrs = mapnew(range(1, 12), 'screenattr(1, v:val)') + call assert_equal(expected_attrs, attrs) + endfor + + bw! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |