Mercurial > vim
comparison src/testdir/test_taglist.vim @ 19617:5ce724c60c4c v8.2.0365
patch 8.2.0365: tag kind can't be a multi-byte character
Commit: https://github.com/vim/vim/commit/283e5f4e69b204e0eafd408548e69b7ca9b4871b
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 9 08:17:52 2020 +0100
patch 8.2.0365: tag kind can't be a multi-byte character
Problem: Tag kind can't be a multi-byte character. (Marcin Szamotulski)
Solution: Recognize multi-byte character. (closes https://github.com/vim/vim/issues/5724)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 09 Mar 2020 08:30:04 +0100 |
parents | 8645b73b3645 |
children | 9199f34d838e |
comparison
equal
deleted
inserted
replaced
19616:2b785ea6d1f4 | 19617:5ce724c60c4c |
---|---|
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:", | 9 \ "Kindly\tXbar\t3;\"\tv\tfile:", |
10 \ "Lambda\tXbar\t3;\"\tλ\tfile:", | |
10 \ "Command\tXbar\tcall cursor(3, 4)|;\"\td", | 11 \ "Command\tXbar\tcall cursor(3, 4)|;\"\td", |
11 \ ], 'Xtags') | 12 \ ], 'Xtags') |
12 set tags=Xtags | 13 set tags=Xtags |
13 split Xtext | 14 split Xtext |
14 | 15 |
15 call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo"), {i, v -> v.name})) | 16 call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo"), {i, v -> v.name})) |
16 call assert_equal(['FFoo', 'BFoo'], map("Foo"->taglist("Xtext"), {i, v -> v.name})) | 17 call assert_equal(['FFoo', 'BFoo'], map("Foo"->taglist("Xtext"), {i, v -> v.name})) |
17 call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xfoo"), {i, v -> v.name})) | 18 call assert_equal(['FFoo', 'BFoo'], map(taglist("Foo", "Xfoo"), {i, v -> v.name})) |
18 call assert_equal(['BFoo', 'FFoo'], map(taglist("Foo", "Xbar"), {i, v -> v.name})) | 19 call assert_equal(['BFoo', 'FFoo'], map(taglist("Foo", "Xbar"), {i, v -> v.name})) |
19 | 20 |
20 let kind = taglist("Kindly") | 21 let kindly = taglist("Kindly") |
21 call assert_equal(1, len(kind)) | 22 call assert_equal(1, len(kindly)) |
22 call assert_equal('v', kind[0]['kind']) | 23 call assert_equal('v', kindly[0]['kind']) |
23 call assert_equal('3', kind[0]['cmd']) | 24 call assert_equal('3', kindly[0]['cmd']) |
24 call assert_equal(1, kind[0]['static']) | 25 call assert_equal(1, kindly[0]['static']) |
25 call assert_equal('Xbar', kind[0]['filename']) | 26 call assert_equal('Xbar', kindly[0]['filename']) |
27 | |
28 let lambda = taglist("Lambda") | |
29 call assert_equal(1, len(lambda)) | |
30 call assert_equal('λ', lambda[0]['kind']) | |
26 | 31 |
27 let cmd = taglist("Command") | 32 let cmd = taglist("Command") |
28 call assert_equal(1, len(cmd)) | 33 call assert_equal(1, len(cmd)) |
29 call assert_equal('d', cmd[0]['kind']) | 34 call assert_equal('d', cmd[0]['kind']) |
30 call assert_equal('call cursor(3, 4)', cmd[0]['cmd']) | 35 call assert_equal('call cursor(3, 4)', cmd[0]['cmd']) |