summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-05-06 17:32:19 +0200
committerBram Moolenaar <Bram@vim.org>2018-05-06 17:32:19 +0200
commit7ce551f317a0bb92f8c0521e96325301e2d220ca (patch)
tree752ebde3a2f01edaa7397d69edccee35e4971f63 /src
parent5aa9896b2e3330e32dc42a54731cc44ec904acca (diff)
downloadvim-git-7ce551f317a0bb92f8c0521e96325301e2d220ca.tar.gz
patch 8.0.1799: no test for :registers commandv8.0.1799
Problem: No test for :registers command. Solution: Add a test. (Dominique Pelle, closes #2880)
Diffstat (limited to 'src')
-rw-r--r--src/testdir/test_registers.vim38
-rw-r--r--src/version.c2
2 files changed, 40 insertions, 0 deletions
diff --git a/src/testdir/test_registers.vim b/src/testdir/test_registers.vim
index 912a5c7e3..d7b6de565 100644
--- a/src/testdir/test_registers.vim
+++ b/src/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
diff --git a/src/version.c b/src/version.c
index 0f0a1b7d2..7f7e1b61f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1799,
+/**/
1798,
/**/
1797,