Mercurial > vim
annotate src/testdir/test_tagjump.vim @ 14093:a9d94f10ecef v8.1.0064
patch 8.1.0064: typing CTRL-W in a prompt buffer shows mode "-- --"
commit https://github.com/vim/vim/commit/942b4541a2d8e8df8369ab70e112dbbbe0c7c0aa
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 17 16:23:34 2018 +0200
patch 8.1.0064: typing CTRL-W in a prompt buffer shows mode "-- --"
Problem: Typing CTRL-W in a prompt buffer shows mode "-- --".
Solution: Set restart_edit to 'A' and check for it.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 17 Jun 2018 16:30:06 +0200 |
parents | b88fa651c824 |
children | c338c91086b9 |
rev | line source |
---|---|
8934
42c8599421e5
commit https://github.com/vim/vim/commit/8d8aa0a367380f23f0af428fcb66a1a0615bf872
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for tagjump (tags and special searches) |
42c8599421e5
commit https://github.com/vim/vim/commit/8d8aa0a367380f23f0af428fcb66a1a0615bf872
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
42c8599421e5
commit https://github.com/vim/vim/commit/8d8aa0a367380f23f0af428fcb66a1a0615bf872
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 " SEGV occurs in older versions. (At least 7.4.1748 or older) |
42c8599421e5
commit https://github.com/vim/vim/commit/8d8aa0a367380f23f0af428fcb66a1a0615bf872
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 func Test_ptag_with_notagstack() |
42c8599421e5
commit https://github.com/vim/vim/commit/8d8aa0a367380f23f0af428fcb66a1a0615bf872
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 set notagstack |
42c8599421e5
commit https://github.com/vim/vim/commit/8d8aa0a367380f23f0af428fcb66a1a0615bf872
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 call assert_fails('ptag does_not_exist_tag_name', 'E426') |
42c8599421e5
commit https://github.com/vim/vim/commit/8d8aa0a367380f23f0af428fcb66a1a0615bf872
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 set tagstack&vim |
42c8599421e5
commit https://github.com/vim/vim/commit/8d8aa0a367380f23f0af428fcb66a1a0615bf872
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 endfunc |
9228
ea504064c996
commit https://github.com/vim/vim/commit/fd89d7ea81b18d32363456b16258174dc9e095dc
Christian Brabandt <cb@256bit.org>
parents:
8934
diff
changeset
|
9 |
9949
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
10 func Test_cancel_ptjump() |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
11 set tags=Xtags |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
12 call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
13 \ "word\tfile1\tcmd1", |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
14 \ "word\tfile2\tcmd2"], |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
15 \ 'Xtags') |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
16 |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
17 only! |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
18 call feedkeys(":ptjump word\<CR>\<CR>", "xt") |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
19 help |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
20 call assert_equal(2, winnr('$')) |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
21 |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
22 call delete('Xtags') |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
23 quit |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
24 endfunc |
30be4b26a37e
commit https://github.com/vim/vim/commit/358308dd99abdd56c6540339e505585d8db7bdfe
Christian Brabandt <cb@256bit.org>
parents:
9909
diff
changeset
|
25 |
10611
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
26 func Test_static_tagjump() |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
27 set tags=Xtags |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
28 call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
29 \ "one\tXfile1\t/^one/;\"\tf\tfile:\tsignature:(void)", |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
30 \ "word\tXfile2\tcmd2"], |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
31 \ 'Xtags') |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
32 new Xfile1 |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
33 call setline(1, ['empty', 'one()', 'empty']) |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
34 write |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
35 tag one |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
36 call assert_equal(2, line('.')) |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
37 |
11008
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
38 bwipe! |
10611
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
39 set tags& |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
40 call delete('Xtags') |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
41 call delete('Xfile1') |
11008
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
42 endfunc |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
43 |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
44 func Test_duplicate_tagjump() |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
45 set tags=Xtags |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
46 call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
47 \ "thesame\tXfile1\t1;\"\td\tfile:", |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
48 \ "thesame\tXfile1\t2;\"\td\tfile:", |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
49 \ "thesame\tXfile1\t3;\"\td\tfile:", |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
50 \ ], |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
51 \ 'Xtags') |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
52 new Xfile1 |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
53 call setline(1, ['thesame one', 'thesame two', 'thesame three']) |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
54 write |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
55 tag thesame |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
56 call assert_equal(1, line('.')) |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
57 tnext |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
58 call assert_equal(2, line('.')) |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
59 tnext |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
60 call assert_equal(3, line('.')) |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
61 |
10611
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
62 bwipe! |
11008
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
63 set tags& |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
64 call delete('Xtags') |
0ecd07cd2e43
patch 8.0.0393: order of duplicate tags is not preserved
Christian Brabandt <cb@256bit.org>
parents:
10611
diff
changeset
|
65 call delete('Xfile1') |
10611
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
66 endfunc |
6bff81438f27
patch 8.0.0195: fail to jump to static tag in current file
Christian Brabandt <cb@256bit.org>
parents:
10145
diff
changeset
|
67 |
11476
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
68 func Test_tagjump_switchbuf() |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
69 set tags=Xtags |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
70 call writefile(["!_TAG_FILE_ENCODING\tutf-8\t//", |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
71 \ "second\tXfile1\t2", |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
72 \ "third\tXfile1\t3",], |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
73 \ 'Xtags') |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
74 call writefile(['first', 'second', 'third'], 'Xfile1') |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
75 |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
76 enew | only |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
77 set switchbuf= |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
78 stag second |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
79 call assert_equal(2, winnr('$')) |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
80 call assert_equal(2, line('.')) |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
81 stag third |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
82 call assert_equal(3, winnr('$')) |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
83 call assert_equal(3, line('.')) |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
84 |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
85 enew | only |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
86 set switchbuf=useopen |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
87 stag second |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
88 call assert_equal(2, winnr('$')) |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
89 call assert_equal(2, line('.')) |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
90 stag third |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
91 call assert_equal(2, winnr('$')) |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
92 call assert_equal(3, line('.')) |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
93 |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
94 enew | only |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
95 set switchbuf=usetab |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
96 tab stag second |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
97 call assert_equal(2, tabpagenr('$')) |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
98 call assert_equal(2, line('.')) |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
99 1tabnext | stag third |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
100 call assert_equal(2, tabpagenr('$')) |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
101 call assert_equal(3, line('.')) |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
102 |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
103 tabclose! |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
104 enew | only |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
105 call delete('Xfile1') |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
106 call delete('Xtags') |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
107 set switchbuf&vim |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
108 endfunc |
c45fb081391c
patch 8.0.0621: :stag does not respect 'switchbuf'
Christian Brabandt <cb@256bit.org>
parents:
11008
diff
changeset
|
109 |
10145
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
110 " Tests for [ CTRL-I and CTRL-W CTRL-I commands |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
111 function Test_keyword_jump() |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
112 call writefile(["#include Xinclude", "", |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
113 \ "", |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
114 \ "/* test text test tex start here", |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
115 \ " some text", |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
116 \ " test text", |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
117 \ " start OK if found this line", |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
118 \ " start found wrong line", |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
119 \ "test text"], 'Xtestfile') |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
120 call writefile(["/* test text test tex start here", |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
121 \ " some text", |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
122 \ " test text", |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
123 \ " start OK if found this line", |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
124 \ " start found wrong line", |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
125 \ "test text"], 'Xinclude') |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
126 new Xtestfile |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
127 call cursor(1,1) |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
128 call search("start") |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
129 exe "normal! 5[\<C-I>" |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
130 call assert_equal(" start OK if found this line", getline('.')) |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
131 call cursor(1,1) |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
132 call search("start") |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
133 exe "normal! 5\<C-W>\<C-I>" |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
134 call assert_equal(" start OK if found this line", getline('.')) |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
135 enew! | only |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
136 call delete('Xtestfile') |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
137 call delete('Xinclude') |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
138 endfunction |
eb9a7296ae9f
commit https://github.com/vim/vim/commit/53f1673cd909eb1c809c6a9086e3d104a0df9bed
Christian Brabandt <cb@256bit.org>
parents:
9949
diff
changeset
|
139 |
12686
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
140 " Test for jumping to a tag with 'hidden' set, with symbolic link in path of |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
141 " tag. This only works for Unix, because of the symbolic link. |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
142 func Test_tag_symbolic() |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
143 if !has('unix') |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
144 return |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
145 endif |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
146 set hidden |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
147 call delete("Xtest.dir", "rf") |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
148 call system("ln -s . Xtest.dir") |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
149 " Create a tags file with the current directory name inserted. |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
150 call writefile([ |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
151 \ "SECTION_OFF " . getcwd() . "/Xtest.dir/Xtest.c /^#define SECTION_OFF 3$/", |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
152 \ '', |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
153 \ ], 'Xtags') |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
154 call writefile(['#define SECTION_OFF 3', |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
155 \ '#define NUM_SECTIONS 3'], 'Xtest.c') |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
156 |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
157 " Try jumping to a tag, but with a path that contains a symbolic link. When |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
158 " wrong, this will give the ATTENTION message. The next space will then be |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
159 " eaten by hit-return, instead of moving the cursor to 'd'. |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
160 set tags=Xtags |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
161 enew! |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
162 call append(0, 'SECTION_OFF') |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
163 call cursor(1,1) |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
164 exe "normal \<C-]> " |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
165 call assert_equal('Xtest.c', expand('%:t')) |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
166 call assert_equal(2, col('.')) |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
167 |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
168 set hidden& |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
169 set tags& |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
170 enew! |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
171 call delete('Xtags') |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
172 call delete('Xtest.c') |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
173 call delete("Xtest.dir", "rf") |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
174 %bwipe! |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
175 endfunc |
aa658b33f25a
patch 8.0.1221: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
11476
diff
changeset
|
176 |
12750
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
177 " Tests for tag search with !_TAG_FILE_ENCODING. |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
178 " Depends on the test83-tags2 and test83-tags3 files. |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
179 func Test_tag_file_encoding() |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
180 if has('vms') |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
181 return |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
182 endif |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
183 |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
184 if !has('iconv') || iconv("\x82\x60", "cp932", "utf-8") != "\uff21" |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
185 return |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
186 endif |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
187 |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
188 let save_enc = &encoding |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
189 set encoding=utf8 |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
190 |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
191 let content = ['text for tags1', 'abcdefghijklmnopqrs'] |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
192 call writefile(content, 'Xtags1.txt') |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
193 let content = ['text for tags2', 'ABC'] |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
194 call writefile(content, 'Xtags2.txt') |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
195 let content = ['text for tags3', 'ABC'] |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
196 call writefile(content, 'Xtags3.txt') |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
197 let content = ['!_TAG_FILE_ENCODING utf-8 //', 'abcdefghijklmnopqrs Xtags1.txt /abcdefghijklmnopqrs'] |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
198 call writefile(content, 'Xtags1') |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
199 |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
200 " case1: |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
201 new |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
202 set tags=Xtags1 |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
203 tag abcdefghijklmnopqrs |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
204 call assert_equal('Xtags1.txt', expand('%:t')) |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
205 call assert_equal('abcdefghijklmnopqrs', getline('.')) |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
206 close |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
207 |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
208 " case2: |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
209 new |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
210 set tags=test83-tags2 |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
211 tag /.BC |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
212 call assert_equal('Xtags2.txt', expand('%:t')) |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
213 call assert_equal('ABC', getline('.')) |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
214 close |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
215 |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
216 " case3: |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
217 new |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
218 set tags=test83-tags3 |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
219 tag abc50 |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
220 call assert_equal('Xtags3.txt', expand('%:t')) |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
221 call assert_equal('ABC', getline('.')) |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
222 close |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
223 |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
224 set tags& |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
225 let &encoding = save_enc |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
226 call delete('Xtags1.txt') |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
227 call delete('Xtags2.txt') |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
228 call delete('Xtags3.txt') |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
229 call delete('Xtags1') |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
230 endfunc |
0b6c09957b43
patch 8.0.1253: still too many old style tests
Christian Brabandt <cb@256bit.org>
parents:
12686
diff
changeset
|
231 |
13227
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
232 func Test_tagjump_etags() |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
233 if !has('emacs_tags') |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
234 return |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
235 endif |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
236 call writefile([ |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
237 \ "void foo() {}", |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
238 \ "int main(int argc, char **argv)", |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
239 \ "{", |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
240 \ "\tfoo();", |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
241 \ "\treturn 0;", |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
242 \ "}", |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
243 \ ], 'Xmain.c') |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
244 |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
245 call writefile([ |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
246 \ "\x0c", |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
247 \ "Xmain.c,64", |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
248 \ "void foo() {}\x7ffoo\x011,0", |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
249 \ "int main(int argc, char **argv)\x7fmain\x012,14", |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
250 \ ], 'Xtags') |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
251 set tags=Xtags |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
252 ta foo |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
253 call assert_equal('void foo() {}', getline('.')) |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
254 |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
255 call delete('Xtags') |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
256 call delete('Xmain.c') |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
257 bwipe! |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
258 endfunc |
b88fa651c824
patch 8.0.1488: emacs tags no longer work
Christian Brabandt <cb@256bit.org>
parents:
12750
diff
changeset
|
259 |
9909
3ee84d270ea7
commit https://github.com/vim/vim/commit/9e4d8215d386100ab660d7d11e6620fd148b605e
Christian Brabandt <cb@256bit.org>
parents:
9228
diff
changeset
|
260 " vim: shiftwidth=2 sts=2 expandtab |