summaryrefslogtreecommitdiff
path: root/src/testdir/test83.in
blob: 300ddf1c7889e259837f1b16c62920d6c917665e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
Tests for tag search with !_TAG_FILE_ENCODING.

STARTTEST
:so mbyte.vim
:if !has('iconv')
: e! test.ok
: w! test.out
: qa!
:endif
:set enc=utf8

:/^text for tags1$/,/^text for tags1$/+1w! Xtags1.txt
:/^text for tags2$/,/^text for tags2$/+1w! Xtags2.txt
:/^text for tags3$/,/^text for tags3$/+1w! Xtags3.txt
:/^tags1$/+1,/^tags1-end$/-1w! Xtags1

ggdG

:call setline('.', 'Results of test83')

:" case1:
:new
:set tags=Xtags1
:let v:errmsg = ''
:tag abcdefghijklmnopqrs
:if v:errmsg =~ 'E426:' || getline('.') != 'abcdefghijklmnopqrs'
: close
: put ='case1: failed'
:else
: close
: put ='case1: ok'
:endif

:" case2:
:new
:set tags=test83-tags2
:let v:errmsg = ''
:tag /.BC
:if v:errmsg =~ 'E426:' || getline('.') != 'ABC'
: close
: put ='case2: failed'
:else
: close
: put ='case2: ok'
:endif

:" case3:
:new
:set tags=test83-tags3
:let v:errmsg = ''
:tag abc50
:if v:errmsg =~ 'E426:' || getline('.') != 'ABC'
: close
: put ='case3: failed'
:else
: close
: put ='case3: ok'
:endif
:close

:wq! test.out
ENDTEST

text for tags1
abcdefghijklmnopqrs

text for tags2
ABC

text for tags3
ABC

tags1
!_TAG_FILE_ENCODING	utf-8	//
abcdefghijklmnopqrs	Xtags1.txt	/abcdefghijklmnopqrs
tags1-end