summaryrefslogtreecommitdiffstats
path: root/kate/tests/highlight.dox
blob: 39b404fe2c78319871f890ecb69713fbac7079ae (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
This is a pseudo doxygen file to test Kate's doxyge syntax highlighting.

Normal text, no HL.
===================
a multiline comment may begin with a /*! */, too. That should work,
because it is the same "entrance rule".

popping tests:
/** multiline */ end of doxygen HL mode
/*! multiline */ end of doxygen HL mode
//! singleline, where */ should be ignored! still doxygen HL mode
/// singleline, where */ should be ignored! still doxygen HL mode
///< singleline, where */ should be ignored! still doxygen HL mode
begin and end immediately:
/********/ actually no doxygen comment - used for "info boxes" :)
/**/ <-- it really works --- end of doxygen HL mode
/*!*/ end of doxygen HL mode

<tag> <normal comment HL>
/** \code rest of line is normal comment HL */ end of doxygen HL mode
/** \code rest of line is normal comment HL
 * comment HL mode
 */ end of doxygen HL mode

<tag> <word> <normal comment HL>
/** \file aword rest of line is normal comment HL */ end of doxygen HL mode
/** \file */aword <-- pop! no doxygen HL mode
/** \file aword rest of line is normal comment HL
 * comment HL mode
 */ end of doxygen HL mode

<tag> <rest of line is string>
/** \brief A short description */ end of doxygen HL mode
/** \brief */A <-- pop! end of doxygen HL mode
/** \brief A short description 
 * comment HL mode
 */ end of doxygen HL mode

<tag> <word> <rest of line is string>
/** \page aword rest of line is string */ end of doxygen HL mode
/** \page */aword <-- pop! end of doxygen HL mode
/** \page aword rest of line is string 
 * comment HL mode
 */ end of doxygen HL mode

<tag> <word> <word> <normal comment HL>
/** \image aword aword rest of line is normal HL */ end of doxygen HL mode
/** \image aword */aword <-- pop! end of doxygen HL mode
/** \image */aword aword <-- pop! end of doxygen HL mode
/** \image aword aword rest of line is normal HL
 * comment HL mode
 */ end of doxygen HL mode

Tests for HTML tags in doxygen HL mode:
=======================================
/** <a href="blubb" href='blubb'> */ end of doxygen HL mode
/** <a href="blubb" href='blubb'*/> end of doxygen HL mode
/** <a href="blubb" href='blubb*/'> end of doxygen HL mode
/** <a href="blubb" href='blub*/b'> end of doxygen HL mode
/** <a href="blubb" href='b*/lubb'> end of doxygen HL mode
/** <a href="blubb" href='*/blubb'> end of doxygen HL mode
/** <a href="blubb" href=*/'blubb'> end of doxygen HL mode
/** <a href="blubb" href*/='blubb'> end of doxygen HL mode
/** <a href="blubb" hre*/f='blubb'> end of doxygen HL mode
/** <a href="blubb" */href='blubb'> end of doxygen HL mode
/** <a href="blubb"> */ end of doxygen HL mode
/** <a href="blubb"*/> end of doxygen HL mode
/** <a href="blubb*/"> end of doxygen HL mode
/** <a href="blub*/b"> end of doxygen HL mode
/** <a href="*/blubb"> end of doxygen HL mode
/** <a href=*/"blubb"> end of doxygen HL mode
/** <a href*/="blubb"> end of doxygen HL mode
/** <a h*/ref="blubb"> end of doxygen HL mode
/** <a */href="blubb"> end of doxygen HL mode
/** <a*/ href="blubb"> end of doxygen HL mode
/** <*/a href="blubb"> end of doxygen HL mode

//! <a href="blubb" href='blubb'> */ stay in doygen HL mode
//! <a href="blubb" href='blubb'*/> stay in doygen HL mode
//! <a href="blubb" href='blubb*/'> stay in doygen HL mode
//! <a href="blubb" href='blu*/bb'> stay in doygen HL mode
//! <a href="blubb" href='*/blubb'> stay in doygen HL mode
//! <a href="blubb" href=*/'blubb'> stay in doygen HL mode
//! <a href="blubb"> */ stay in doygen HL mode
//! <a href="blubb"*/> stay in doygen HL mode
//! <a href="blubb*/"> stay in doygen HL mode
//! <a href="blub*/b"> stay in doygen HL mode
//! <a href="*/blubb"> stay in doygen HL mode
//! <a href=*/"blubb"> stay in doygen HL mode
//! <a href*/="blubb"> stay in doygen HL mode
//! <a h*/ref="blubb"> stay in doygen HL mode
//! <a */href="blubb"> stay in doygen HL mode
//! <a*/ href="blubb"> stay in doygen HL mode
//! <*/a href="blubb">  stay in doygen HL mode
//! <a href="blubb">  stay in doygen HL <mode
here should be normal HL mode (no doxygen!)

Tests for HTML tags in doxygen HL mode with tags:
=================================================
<tag> <normal comment HL>
/** \code rest <a href="blubb"> of </a href='blubb'> line is normal comment HL */ end of doxygen HL mode
/** \code rest <a href="blubb"> of </a href='blubb'*/> end of doxygen HL mode
/** \code rest <a href="blubb"> of </a href='blubb*/'> end of doxygen HL mode
/** \code rest <a href="blubb"> of </a href='*/blubb'> end of doxygen HL mode
/** \code rest <a href="blubb"> of </a href=*/'blubb'> end of doxygen HL mode
/** \code rest <a href="blubb*/"> of </a href=*/'blubb'> end of doxygen HL mode
/** \code rest <a href=*/"blubb"> of </a href='blubb'> end of doxygen HL mode
/** \code rest <a h*/ref="blubb"> of </a href='blubb'> end of doxygen HL mode
/** \code rest <*/a href="blubb"> of </a href='blubb'> end of doxygen HL mode
/** \code rest of line is normal comment HL
 * comment HL mode <html> text </html>
 */ end of doxygen HL mode

<tag> <word> <normal comment HL>
/** \file awo<html_should_be_ignored_here>rd rest of line is normal comment HL */ end of doxygen HL mode
/** \file awo<html_should_be_ignored_here>*/rd end of doxygen HL mode
/** \file awo<html_should_be_i*/gnored_here>rd end of doxygen HL mode
/** \file awo<*/html_should_be_ignored_here>rd end of doxygen HL mode
/** \file a*/wo<html_should_be_ignored_here>rd end of doxygen HL mode
/** \file aword rest of line is normal co<code>mment HL
 * comment HL mode
 */ end of doxygen HL mode

<tag> <rest of line is string>
/** \brief A short <a href="blubb"> of </a href='blubb'> description */ end of doxygen HL mode
/** \brief A short <a href="blubb"> of </a href='blubb'*/> end of doxygen HL mode
/** \brief A short <a href="blubb"> of </a href='*/blubb'> end of doxygen HL mode
/** \brief A short <a href="blubb"> of </a href=*/'blubb'> end of doxygen HL mode
/** \brief A short <a href="blubb"> of </a href*/='blubb'> end of doxygen HL mode
/** \brief A short <a href="blubb"> of </a */href='blubb'> end of doxygen HL mode
/** \brief A short <a href="blubb"> of <*//a href='blubb'> end of doxygen HL mode
/** \brief A short <a href="blubb"*/> of </a href='blubb'> end of doxygen HL mode
/** \brief A short <a href="blubb*/"> of </a href='blubb'> end of doxygen HL mode
/** \brief A short <a href="*/blubb"> of </a href='blubb'> end of doxygen HL mode
/** \brief A short <a href=*/"blubb"> of </a href='blubb'> end of doxygen HL mode
/** \brief A short <a href*/="blubb"> of </a href='blubb'> end of doxygen HL mode
/** \brief A short <a h*/ref="blubb"> of </a href='blubb'> end of doxygen HL mode
/** \brief A short <a href="blubb"> of </a href='blubb'> description 
 * comment HL mode
 */ end of doxygen HL mode

<tag> <word> <rest of line is string>
/** \page aword A short <a href="blubb"> of </a href='blubb'> description */ end of doxygen HL mode
/** \page aword A short <a href="blubb"> of </a href='blubb'*/> end of doxygen HL mode
/** \page aword A short <a href="blubb"> of </a href='*/blubb'> end of doxygen HL mode
/** \page aword A short <a href="blubb"> of </a href=*/'blubb'> end of doxygen HL mode
/** \page aword A short <a href="blubb"> of </a href*/='blubb'> end of doxygen HL mode
/** \page aword A short <a href="blubb"> of </a */href='blubb'> end of doxygen HL mode
/** \page aword A short <a href="blubb"> of <*//a href='blubb'> end of doxygen HL mode
/** \page aword A short <a href="blubb"*/> of </a href='blubb'> end of doxygen HL mode
/** \page aword A short <a href="blubb*/"> of </a href='blubb'> end of doxygen HL mode
/** \page aword A short <a href="*/blubb"> of </a href='blubb'> end of doxygen HL mode
/** \page aword A short <a href=*/"blubb"> of </a href='blubb'> end of doxygen HL mode
/** \page aword A short <a href*/="blubb"> of </a href='blubb'> end of doxygen HL mode
/** \page aword A short <a h*/ref="blubb"> of </a href='blubb'> end of doxygen HL mode
/** \page aword A short <*/a href="blubb"> of </a href='blubb'> end of doxygen HL mode
/** \page aword A shor*/t <a href="blubb"> of </a href='blubb'> end of doxygen HL mode
/** \page awor*/d A short <a href="blubb"> of </a href='blubb'> end of doxygen HL mode
/** \page */aword A short <a href="blubb"> of </a href='blubb'> end of doxygen HL mode
/** \page aword A short <a href="blubb"> of </a href='blubb'> description 
 * comment HL mode
 */ end of doxygen HL mode

<tag> <word> <word> <rest of line is string>
/** \image aword aword rest of line is normal HL */ end of doxygen HL mode
/** \image aword aword rest of line is*/ end of doxygen HL mode
/** \image aword aword*/ end of doxygen HL mode
/** \image aword aw*/ord end of doxygen HL mode
/** \image aword */aword end of doxygen HL mode
/** \image aword*/ end of doxygen HL mode
/** \image awo*/rd end of doxygen HL mode
/** \image */aword end of doxygen HL mode
/** \ima*/ge end of doxygen HL mode
/** \image aword aword rest of line is normal HL
 * comment HL mode
 */ end of doxygen HL mode
 
Some further tests for singlelinecomments (* / should not pop!)
===============================================================
/// a singlelinecommment blubb blubb  */. stay in doxygen HL mode
/// \code a singlelinecommment blubb b*/lubb. stay in doxygen HL mode
/// \code*/ a singlelinecommment blubb blubb. stay in doxygen HL mode
/// \code a singlelinecommment blubb blubb
/// \brief a descriptive text (string) stay in doxygen HL mode
/// \brief a descriptive text (string)*/ description should go on here
/// \brief a descriptive text */(string) description should go on here
/// \brief */a descriptive text (string) description should go on here
/// \ref aword a descriptive text (string) */ description should go on here
/// \ref aword a descriptive text (str*/ing) description should go on here
/// \ref aword a des*/criptive text (string) description should go on here
/// \ref aword*/ a descriptive text (string) description should go on here
/// \ref aw*/ord a descriptive text (string) description should go on here
/// \ref */aword a descriptive text (string) description should go on here

HTML comment tests:
===================
//! \ref word de<!--*/ -->scriptive text (string)
normal HL mode.
//! \ref w descriptive text (string)
/** \ref word de<!--*/ -->scriptive text (string)
normal HL mode.
/** \ref w <!--
 * HTML comments
 * -->
 * normal doxygen HL mode.
 */


And final tests for a word: a single char:
===========================================
<tag> <word> <rest of line as string>
//! \ref word descriptive text (string)
//! \ref w descriptive text (string)

<tag> <word> <word> <rest is normal HL>
//! \image word1 word2 b descriptive text (string)
//! \image a word b descriptive text (string)

<tag> <rest of line is string>
//! \brief A b c d e description should go on here

<tag> <word> <rest of line is normal doxygen HL mode>
//! \file word rest of line is normal comment HL
//! \file a word rest of line is normal comment HL

no doxygen HL mode here.
== END OF TESTFILE ==