3131
|
1 Tests for tag search with !_TAG_FILE_ENCODING.
|
|
2
|
|
3 STARTTEST
|
|
4 :so mbyte.vim
|
3235
|
5 :set enc=utf8
|
3233
|
6 :if !has('iconv') || iconv("\x82\x60", "cp932", "utf-8") != "\uff21"
|
3131
|
7 : e! test.ok
|
|
8 : w! test.out
|
|
9 : qa!
|
|
10 :endif
|
|
11
|
|
12 :/^text for tags1$/,/^text for tags1$/+1w! Xtags1.txt
|
|
13 :/^text for tags2$/,/^text for tags2$/+1w! Xtags2.txt
|
|
14 :/^text for tags3$/,/^text for tags3$/+1w! Xtags3.txt
|
|
15 :/^tags1$/+1,/^tags1-end$/-1w! Xtags1
|
|
16
|
|
17 ggdG
|
|
18
|
|
19 :call setline('.', 'Results of test83')
|
|
20
|
|
21 :" case1:
|
|
22 :new
|
|
23 :set tags=Xtags1
|
|
24 :let v:errmsg = ''
|
|
25 :tag abcdefghijklmnopqrs
|
|
26 :if v:errmsg =~ 'E426:' || getline('.') != 'abcdefghijklmnopqrs'
|
|
27 : close
|
|
28 : put ='case1: failed'
|
|
29 :else
|
|
30 : close
|
|
31 : put ='case1: ok'
|
|
32 :endif
|
|
33
|
|
34 :" case2:
|
|
35 :new
|
|
36 :set tags=test83-tags2
|
|
37 :let v:errmsg = ''
|
|
38 :tag /.BC
|
|
39 :if v:errmsg =~ 'E426:' || getline('.') != 'ABC'
|
|
40 : close
|
|
41 : put ='case2: failed'
|
|
42 :else
|
|
43 : close
|
|
44 : put ='case2: ok'
|
|
45 :endif
|
|
46
|
|
47 :" case3:
|
|
48 :new
|
|
49 :set tags=test83-tags3
|
|
50 :let v:errmsg = ''
|
|
51 :tag abc50
|
|
52 :if v:errmsg =~ 'E426:' || getline('.') != 'ABC'
|
|
53 : close
|
|
54 : put ='case3: failed'
|
|
55 :else
|
|
56 : close
|
|
57 : put ='case3: ok'
|
|
58 :endif
|
|
59 :close
|
|
60
|
|
61 :wq! test.out
|
|
62 ENDTEST
|
|
63
|
|
64 text for tags1
|
|
65 abcdefghijklmnopqrs
|
|
66
|
|
67 text for tags2
|
|
68 ABC
|
|
69
|
|
70 text for tags3
|
|
71 ABC
|
|
72
|
|
73 tags1
|
|
74 !_TAG_FILE_ENCODING utf-8 //
|
|
75 abcdefghijklmnopqrs Xtags1.txt /abcdefghijklmnopqrs
|
|
76 tags1-end
|