Mercurial > vim
comparison src/testdir/test_edit.vim @ 19852:12518b40c161 v8.2.0482
patch 8.2.0482: channel and sandbox code not sufficiently tested
Commit: https://github.com/vim/vim/commit/ca68ae13114619df3e4c195b41ad0575516f5ff6
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 30 19:32:53 2020 +0200
patch 8.2.0482: channel and sandbox code not sufficiently tested
Problem: Channel and sandbox code not sufficiently tested.
Solution: Add more tests. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/5855)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 30 Mar 2020 19:45:05 +0200 |
parents | 0208534b8a84 |
children | 252d2bb90394 |
comparison
equal
deleted
inserted
replaced
19851:e259e7903c55 | 19852:12518b40c161 |
---|---|
1540 call assert_equal('abc', getline(1)) | 1540 call assert_equal('abc', getline(1)) |
1541 set showmode& showcmd& | 1541 set showmode& showcmd& |
1542 close! | 1542 close! |
1543 endfunc | 1543 endfunc |
1544 | 1544 |
1545 " Test for inserting text at the beginning of a line | 1545 " Test for inserting text in a line with only spaces ('H' flag in 'cpoptions') |
1546 func Test_insert_before_first_nonblank() | 1546 func Test_edit_cpo_H() |
1547 new | 1547 new |
1548 call setline(1, ' ') | 1548 call setline(1, ' ') |
1549 normal! Ia | 1549 normal! Ia |
1550 call assert_equal(' a', getline(1)) | 1550 call assert_equal(' a', getline(1)) |
1551 set cpo+=H | 1551 set cpo+=H |
1554 call assert_equal(' a ', getline(1)) | 1554 call assert_equal(' a ', getline(1)) |
1555 set cpo-=H | 1555 set cpo-=H |
1556 close! | 1556 close! |
1557 endfunc | 1557 endfunc |
1558 | 1558 |
1559 " Test for inserting tab in virtual replace mode ('L' flag in 'cpoptions') | |
1560 func Test_edit_cpo_L() | |
1561 new | |
1562 call setline(1, 'abcdefghijklmnopqr') | |
1563 exe "normal 0gR\<Tab>" | |
1564 call assert_equal("\<Tab>ijklmnopqr", getline(1)) | |
1565 set cpo+=L | |
1566 set list | |
1567 call setline(1, 'abcdefghijklmnopqr') | |
1568 exe "normal 0gR\<Tab>" | |
1569 call assert_equal("\<Tab>cdefghijklmnopqr", getline(1)) | |
1570 set nolist | |
1571 call setline(1, 'abcdefghijklmnopqr') | |
1572 exe "normal 0gR\<Tab>" | |
1573 call assert_equal("\<Tab>ijklmnopqr", getline(1)) | |
1574 set cpo-=L | |
1575 %bw! | |
1576 endfunc | |
1577 | |
1559 " vim: shiftwidth=2 sts=2 expandtab | 1578 " vim: shiftwidth=2 sts=2 expandtab |