diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-03-18 06:41:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-18 06:41:58 +0800 |
commit | 97bbc49cda267b63c773826858f3337721853746 (patch) | |
tree | 08092256e24ae8a33645c6262b0587a8d85dd3bd /test | |
parent | 08c328b8b079334e7fb38472339c4f8ba1a0df3b (diff) | |
parent | d717f8605a05dad4c050ac1e0731c7aba572fe59 (diff) | |
download | rneovim-97bbc49cda267b63c773826858f3337721853746.tar.gz rneovim-97bbc49cda267b63c773826858f3337721853746.tar.bz2 rneovim-97bbc49cda267b63c773826858f3337721853746.zip |
Merge pull request #32935 from zeertzjq/vim-3495497
vim-patch: too many strlen() calls in edit.c
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_put.vim | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/old/testdir/test_put.vim b/test/old/testdir/test_put.vim index 6b332faaeb..e0a78c7409 100644 --- a/test/old/testdir/test_put.vim +++ b/test/old/testdir/test_put.vim @@ -328,4 +328,31 @@ func Test_put_list() bw! endfunc +" Test pasting the '.' register +func Test_put_inserted() + new + + for s in ['', '…', '0', '^', '+0', '+^', '…0', '…^'] + call setline(1, 'foobar') + exe $"normal! A{s}\<Esc>" + call assert_equal($'foobar{s}', getline(1)) + normal! ".p + call assert_equal($'foobar{s}{s}', getline(1)) + normal! ".2p + call assert_equal($'foobar{s}{s}{s}{s}', getline(1)) + endfor + + for s in ['0', '^', '+0', '+^', '…0', '…^'] + call setline(1, "\t\t\t\t\tfoobar") + exe $"normal! A\<C-D>{s}\<Esc>" + call assert_equal($"\t\t\t\tfoobar{s}", getline(1)) + normal! ".p + call assert_equal($"\t\t\tfoobar{s}{s}", getline(1)) + normal! ".2p + call assert_equal($"\tfoobar{s}{s}{s}{s}", getline(1)) + endfor + + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab |