aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-25 11:11:31 -0500
committerGitHub <noreply@github.com>2020-12-25 11:11:31 -0500
commit84faeb07d0018c674c2bc730333fefae6123f366 (patch)
tree61c974e7925f08fd6ba364ba0165922c3ef4acd2 /src/nvim/testdir
parent8c8cc35926f265bf4f048b83fd130bef3932851e (diff)
parent43834b24ac6037ec7678872877d3370134e46024 (diff)
downloadrneovim-84faeb07d0018c674c2bc730333fefae6123f366.tar.gz
rneovim-84faeb07d0018c674c2bc730333fefae6123f366.tar.bz2
rneovim-84faeb07d0018c674c2bc730333fefae6123f366.zip
Merge pull request #13602 from janlazo/vim-8.2.2206
vim-patch:8.1.2212,8.2.{51,782,856,1174,1212,2206,2211}
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_cmdline.vim18
-rw-r--r--src/nvim/testdir/test_registers.vim46
2 files changed, 49 insertions, 15 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index 81f653c393..8fc3361b79 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/testdir/test_cmdline.vim
@@ -548,6 +548,13 @@ func Test_cmdline_complete_user_names()
endif
endfunc
+func Test_cmdline_complete_bang()
+ if executable('whoami')
+ call feedkeys(":!whoam\<C-A>\<C-B>\"\<CR>", 'tx')
+ call assert_match('^".*\<whoami\>', @:)
+ endif
+endfunc
+
funct Test_cmdline_complete_languages()
let lang = substitute(execute('language messages'), '.*"\(.*\)"$', '\1', '')
@@ -570,6 +577,17 @@ funct Test_cmdline_complete_languages()
endif
endfunc
+func Test_cmdline_complete_expression()
+ let g:SomeVar = 'blah'
+ for cmd in ['exe', 'echo', 'echon', 'echomsg']
+ call feedkeys(":" .. cmd .. " SomeV\<Tab>\<C-B>\"\<CR>", 'tx')
+ call assert_match('"' .. cmd .. ' SomeVar', @:)
+ call feedkeys(":" .. cmd .. " foo SomeV\<Tab>\<C-B>\"\<CR>", 'tx')
+ call assert_match('"' .. cmd .. ' foo SomeVar', @:)
+ endfor
+ unlet g:SomeVar
+endfunc
+
func Test_cmdline_write_alternatefile()
new
call setline('.', ['one', 'two'])
diff --git a/src/nvim/testdir/test_registers.vim b/src/nvim/testdir/test_registers.vim
index 2f72b6a4c0..8d2a768ba0 100644
--- a/src/nvim/testdir/test_registers.vim
+++ b/src/nvim/testdir/test_registers.vim
@@ -2,6 +2,9 @@
" Tests for register operations
"
+source check.vim
+source view_util.vim
+
" This test must be executed first to check for empty and unset registers.
func Test_aaa_empty_reg_test()
call assert_fails('normal @@', 'E748:')
@@ -52,31 +55,44 @@ func Test_display_registers()
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'
+ call assert_match('^\nType Name Content\n'
+ \ . ' c "" a\n'
+ \ . ' c "0 ba\n'
+ \ . ' c "1 b\n'
+ \ . ' c "a b\n'
\ . '.*'
- \ . '"- a\n'
+ \ . ' c "- a\n'
\ . '.*'
- \ . '": ls\n'
- \ . '"% file2\n'
- \ . '"# file1\n'
- \ . '"/ bar\n'
- \ . '"= 2\*4', a)
+ \ . ' c ": ls\n'
+ \ . ' c "% file2\n'
+ \ . ' c "# file1\n'
+ \ . ' c "/ bar\n'
+ \ . ' c "= 2\*4', a)
let a = execute('registers a')
- call assert_match('^\n--- Registers ---\n'
- \ . '"a b', a)
+ call assert_match('^\nType Name Content\n'
+ \ . ' c "a b', a)
let a = execute('registers :')
- call assert_match('^\n--- Registers ---\n'
- \ . '": ls', a)
+ call assert_match('^\nType Name Content\n'
+ \ . ' c ": ls', a)
bwipe!
endfunc
+func Test_recording_status_in_ex_line()
+ norm qx
+ redraw!
+ call assert_equal('recording @x', Screenline(&lines))
+ set shortmess=q
+ redraw!
+ call assert_equal('recording', Screenline(&lines))
+ set shortmess&
+ norm q
+ redraw!
+ call assert_equal('', Screenline(&lines))
+endfunc
+
" Check that replaying a typed sequence does not use an Esc and following
" characters as an escape sequence.
func Test_recording_esc_sequence()