aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2020-01-29 20:30:23 -0800
committerGitHub <noreply@github.com>2020-01-29 20:30:23 -0800
commit4ea5d7d31a0ad43a84d268e6b05193fa27c5e0da (patch)
treeadb5f5b3cb5ff71ec437539136b5f680a46b8de3 /src/nvim/testdir
parent406464fa6e6dbacca82746412b24308bc58ddbc7 (diff)
parentb7447a909fc668b023e86ca40c0e2738dd2e5350 (diff)
downloadrneovim-4ea5d7d31a0ad43a84d268e6b05193fa27c5e0da.tar.gz
rneovim-4ea5d7d31a0ad43a84d268e6b05193fa27c5e0da.tar.bz2
rneovim-4ea5d7d31a0ad43a84d268e6b05193fa27c5e0da.zip
Merge #11792 from janlazo/vim-8.1.0445
vim-patch:8.1.{445,446},8.2.{77,177}
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_options.vim15
-rw-r--r--src/nvim/testdir/test_tagjump.vim22
2 files changed, 37 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim
index 6fcc372591..29d391c232 100644
--- a/src/nvim/testdir/test_options.vim
+++ b/src/nvim/testdir/test_options.vim
@@ -277,6 +277,21 @@ func Test_set_errors()
call assert_fails('set t_foo=', 'E846:')
endfunc
+" Must be executed before other tests that set 'term'.
+func Test_000_term_option_verbose()
+ if has('nvim') || has('gui_running')
+ return
+ endif
+ let verb_cm = execute('verbose set t_cm')
+ call assert_notmatch('Last set from', verb_cm)
+
+ let term_save = &term
+ set term=ansi
+ let verb_cm = execute('verbose set t_cm')
+ call assert_match('Last set from.*test_options.vim', verb_cm)
+ let &term = term_save
+endfunc
+
func Test_set_ttytype()
" Nvim does not support 'ttytype'.
if !has('nvim') && !has('gui_running') && has('unix')
diff --git a/src/nvim/testdir/test_tagjump.vim b/src/nvim/testdir/test_tagjump.vim
index fe98ef1ae2..5fd71d8bfc 100644
--- a/src/nvim/testdir/test_tagjump.vim
+++ b/src/nvim/testdir/test_tagjump.vim
@@ -340,6 +340,28 @@ func Test_getsettagstack()
\ {'items' : [{'tagname' : 'abc', 'from' : [1, 10, 1, 0]}]}, 'a')
call assert_equal('abc', gettagstack().items[19].tagname)
+ " truncate the tag stack
+ call settagstack(1,
+ \ {'curidx' : 9,
+ \ 'items' : [{'tagname' : 'abc', 'from' : [1, 10, 1, 0]}]}, 't')
+ let t = gettagstack()
+ call assert_equal(9, t.length)
+ call assert_equal(10, t.curidx)
+
+ " truncate the tag stack without pushing any new items
+ call settagstack(1, {'curidx' : 5}, 't')
+ let t = gettagstack()
+ call assert_equal(4, t.length)
+ call assert_equal(5, t.curidx)
+
+ " truncate an empty tag stack and push new items
+ call settagstack(1, {'items' : []})
+ call settagstack(1,
+ \ {'items' : [{'tagname' : 'abc', 'from' : [1, 10, 1, 0]}]}, 't')
+ let t = gettagstack()
+ call assert_equal(1, t.length)
+ call assert_equal(2, t.curidx)
+
" Tag with multiple matches
call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//",
\ "two\tXfile1\t1",