diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-17 09:48:54 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-07-17 09:49:39 -0400 |
commit | 031d21221eb430aba70ccee140082a4b39e7192d (patch) | |
tree | f35b666e8edf4f8ca25b4fd1034076caf64692a3 /src | |
parent | b99bbc680e14bb18c54c08786f39a32bc0139695 (diff) | |
download | rneovim-031d21221eb430aba70ccee140082a4b39e7192d.tar.gz rneovim-031d21221eb430aba70ccee140082a4b39e7192d.tar.bz2 rneovim-031d21221eb430aba70ccee140082a4b39e7192d.zip |
vim-patch:8.0.1799: no test for :registers command
Problem: No test for :registers command.
Solution: Add a test. (Dominique Pelle, closes vim/vim#2880)
https://github.com/vim/vim/commit/7ce551f317a0bb92f8c0521e96325301e2d220ca
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_registers.vim | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_registers.vim b/src/nvim/testdir/test_registers.vim index 912a5c7e3d..d7b6de5652 100644 --- a/src/nvim/testdir/test_registers.vim +++ b/src/nvim/testdir/test_registers.vim @@ -25,3 +25,41 @@ func Test_yank_shows_register() bwipe! endfunc + +func Test_display_registers() + e file1 + e file2 + call setline(1, ['foo', 'bar']) + /bar + exe 'norm! y2l"axx' + call feedkeys("i\<C-R>=2*4\n\<esc>") + call feedkeys(":ls\n", 'xt') + + let a = execute('display') + let b = execute('registers') + + call assert_equal(a, b) + call assert_match('^\n--- Registers ---\n' + \ . '"" a\n' + \ . '"0 ba\n' + \ . '"1 b\n' + \ . '"a b\n' + \ . '.*' + \ . '"- a\n' + \ . '.*' + \ . '": ls\n' + \ . '"% file2\n' + \ . '"# file1\n' + \ . '"/ bar\n' + \ . '"= 2\*4', a) + + let a = execute('registers a') + call assert_match('^\n--- Registers ---\n' + \ . '"a b', a) + + let a = execute('registers :') + call assert_match('^\n--- Registers ---\n' + \ . '": ls', a) + + bwipe! +endfunc |