aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-08-10 17:13:48 +0200
committerDaniel Hahler <git@thequod.de>2019-08-10 17:21:18 +0200
commit4109ee8ef4e94bb87bb80e21a35b3697fd5e6229 (patch)
treea0a7d5c50e479e78608c3ac87e4127a18aff3fdb /src/nvim/testdir
parent5f243fc68ad0ab9c3bdf484c8f2753ec9414bf37 (diff)
downloadrneovim-4109ee8ef4e94bb87bb80e21a35b3697fd5e6229.tar.gz
rneovim-4109ee8ef4e94bb87bb80e21a35b3697fd5e6229.tar.bz2
rneovim-4109ee8ef4e94bb87bb80e21a35b3697fd5e6229.zip
vim-patch:8.1.0911: tag line with Ex command cannot have extra fields
Problem: Tag line with Ex command cannot have extra fields. Solution: Recognize |;" as the end of the command. (closes vim/vim#2402) https://github.com/vim/vim/commit/943e9639a9ecb08bdec78ae6695c917bca6210b9
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_taglist.vim16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_taglist.vim b/src/nvim/testdir/test_taglist.vim
index fb8c6c85cd..39bd5dcf04 100644
--- a/src/nvim/testdir/test_taglist.vim
+++ b/src/nvim/testdir/test_taglist.vim
@@ -5,7 +5,9 @@ func Test_taglist()
\ "FFoo\tXfoo\t1",
\ "FBar\tXfoo\t2",
\ "BFoo\tXbar\t1",
- \ "BBar\tXbar\t2"
+ \ "BBar\tXbar\t2",
+ \ "Kindly\tXbar\t3;\"\tv\tfile:",
+ \ "Command\tXbar\tcall cursor(3, 4)|;\"\td",
\ ], 'Xtags')
set tags=Xtags
split Xtext
@@ -15,6 +17,18 @@ func Test_taglist()
call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xfoo"), {i, v -> v.name}))
call assert_equal(['BFoo', 'FFoo'], map(taglist("Foo", "Xbar"), {i, v -> v.name}))
+ let kind = taglist("Kindly")
+ call assert_equal(1, len(kind))
+ call assert_equal('v', kind[0]['kind'])
+ call assert_equal('3', kind[0]['cmd'])
+ call assert_equal(1, kind[0]['static'])
+ call assert_equal('Xbar', kind[0]['filename'])
+
+ let cmd = taglist("Command")
+ call assert_equal(1, len(cmd))
+ call assert_equal('d', cmd[0]['kind'])
+ call assert_equal('call cursor(3, 4)', cmd[0]['cmd'])
+
call delete('Xtags')
set tags&
bwipe