Mercurial > vim
comparison src/testdir/test_taglist.vim @ 15808:37d31fc37a5a v8.1.0911
patch 8.1.0911: tag line with Ex command cannot have extra fields
commit https://github.com/vim/vim/commit/943e9639a9ecb08bdec78ae6695c917bca6210b9
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Feb 13 21:19:14 2019 +0100
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 https://github.com/vim/vim/issues/2402)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 13 Feb 2019 21:30:06 +0100 |
parents | 4afe2386aae8 |
children | d863beec391a |
comparison
equal
deleted
inserted
replaced
15807:55ffa98b7166 | 15808:37d31fc37a5a |
---|---|
3 func Test_taglist() | 3 func Test_taglist() |
4 call writefile([ | 4 call writefile([ |
5 \ "FFoo\tXfoo\t1", | 5 \ "FFoo\tXfoo\t1", |
6 \ "FBar\tXfoo\t2", | 6 \ "FBar\tXfoo\t2", |
7 \ "BFoo\tXbar\t1", | 7 \ "BFoo\tXbar\t1", |
8 \ "BBar\tXbar\t2" | 8 \ "BBar\tXbar\t2", |
9 \ "Kindly\tXbar\t3;\"\tv\tfile:", | |
10 \ "Command\tXbar\tcall cursor(3, 4)|;\"\td", | |
9 \ ], 'Xtags') | 11 \ ], 'Xtags') |
10 set tags=Xtags | 12 set tags=Xtags |
11 split Xtext | 13 split Xtext |
12 | 14 |
13 call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo"), {i, v -> v.name})) | 15 call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo"), {i, v -> v.name})) |
14 call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xtext"), {i, v -> v.name})) | 16 call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xtext"), {i, v -> v.name})) |
15 call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xfoo"), {i, v -> v.name})) | 17 call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xfoo"), {i, v -> v.name})) |
16 call assert_equal(['BFoo', 'FFoo'], map(taglist("Foo", "Xbar"), {i, v -> v.name})) | 18 call assert_equal(['BFoo', 'FFoo'], map(taglist("Foo", "Xbar"), {i, v -> v.name})) |
19 | |
20 let kind = taglist("Kindly") | |
21 call assert_equal(1, len(kind)) | |
22 call assert_equal('v', kind[0]['kind']) | |
23 call assert_equal('3', kind[0]['cmd']) | |
24 call assert_equal(1, kind[0]['static']) | |
25 call assert_equal('Xbar', kind[0]['filename']) | |
26 | |
27 let cmd = taglist("Command") | |
28 call assert_equal(1, len(cmd)) | |
29 call assert_equal('d', cmd[0]['kind']) | |
30 call assert_equal('call cursor(3, 4)', cmd[0]['cmd']) | |
17 | 31 |
18 call delete('Xtags') | 32 call delete('Xtags') |
19 bwipe | 33 bwipe |
20 endfunc | 34 endfunc |
21 | 35 |