]> gitweb.michael.orlitzky.com - nagios-mode.git/blob - test_suite.cfg
nagios-mode.el: drop obsolete syntax-begin-function definition.
[nagios-mode.git] / test_suite.cfg
1 #
2 # nagios-mode test suite.
3 #
4 # Copyright Michael Orlitzky
5 #
6 # http://michael.orlitzky.com/
7 #
8 # This program is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # http://www.fsf.org/licensing/licenses/gpl.html
19 #
20
21 Test 1: Comments should be colored correctly.
22 # First comment form.
23 ; Second comment form.
24 ; A comment not starting at the beginning of a line.
25 # And the second form of the above.
26 How about # a comment that starts after some non-comment text?
27
28
29 Test 2: Directives, specials, macros, definitions, and strings
30 within comments should appear as part of the comment.
31 # contacts is a directive.
32 # use, name, and register are specials.
33 # $USER1$ is an example of a macro.
34 # and define host is one of the possible definitions.
35 # Heck, let's try "strings" while we're at it.
36
37
38 Test 3: The standard "define host" below should be function-name-faced.
39 define host {
40 }
41
42
43 Test 4: The "define host" should be colored, but the braces *should not* be.
44 define host{
45 }
46
47
48 Test 5: Multiple spaces before the brace.
49 define host {
50 }
51
52
53 Test 6: Closing brace on the same line.
54 define host {}
55
56
57 Test 7: Directive coloring should work at the beginning of a line.
58 contacts
59
60
61 Test 8: Directive coloring should work after any number of spaces.
62 contacts
63
64
65 Test 9: Directive coloring should work after a tab.
66 contacts
67
68
69 Test 10: Directives should not be colored in the middle of sentences.
70 Such as contacts in the middle of a sentence.
71
72
73 Test 11: Directives should not be colored at the end of a line.
74 For example, contacts
75
76
77 Test 12: Directives should only be colored when they are stand-alone
78 words. Therefore, the following should *not* be colored.
79 example-contacts
80 example_contacts
81 contacts-test
82 contacts_test
83 test-contacts-example
84 test_contacts_example
85
86
87 Test 13: Definitions must be stand-alone as well. The following
88 should *not* be colored.
89 undefine host
90 undefine host{ }
91 define-host
92 define_host
93 -define host-
94 _undefine_host_
95
96
97 Test 14: Text inside of a open/close brace pair should be indented
98 by default.
99 {
100 This should be indented.
101 }
102
103 define host {
104 As should this.
105 }
106
107
108 Test 15: Braces within comments should appear as part of the comment.
109 # For { example }.
110 ; { Ditto }
111
112
113 Test 16: Comments (and closing braces) that come after an curly
114 brace should all be comment-colored.
115 define host { # Everything hereafter is a { comment }.
116 } ; As well as here {}.
117
118
119 Test 17: Macros should be constant-faced under normal circumstances.
120 $USER1$
121 $USER1$ $USER2$
122 $ADMINEMAIL$ $ADMINPAGER$
123
124
125 Test 18: Macros should appear constant-faced even when they don't
126 occur along a word boundary.
127 $USER1$=something
128 $ADMINPAGER$="string"
129 $USER1$=$USER2$
130
131
132 Test 19: Macros within strings appear as part of the string
133 "I'm unsure if string $USER1$ interpolation is possible."
134
135
136 Test 20: Macros can occur within a directive/special value.
137 define host {
138 name $USER1$
139 contacts $ADMINPAGER$
140 friday I'm $USER1$ love.
141 }
142
143
144 Test 21: Directives that occur as a special value should
145 be neither special- nor directive-faced.
146 define host {
147 name contacts
148 use monday
149 }
150
151
152 Test 22: Directives that occur as directive values should
153 not be directive-faced.
154 define host {
155 monday tuesday wednesday thursday friday
156 }
157
158
159 Test 23: Specials that occur as special values should
160 not be special-faced.
161 define host {
162 use register name
163 }
164
165
166 Test 24: Specials that occur as a directive value should
167 be neither special- nor directive-faced.
168 define host {
169 contacts name
170 monday use
171 }
172
173
174 Test 25: Definitions should work when not at the beginning
175 of a line.
176 define service {}
177
178
179 Test 26: Definitions that,
180
181 a) End with a curly brace followed by a newline
182 b) Have a special as the first entry
183
184 should be colored properly.
185
186 define service{
187 use whatever
188 }
189
190
191 Test 27: Comment characters within strings should be ignored,
192 that is, treated like strings.
193 "Here comes a #comment"
194 "And the ;second form"
195
196
197 Test 28: Strings within comments should be ignored as well.
198 # The "string" should be comment-faced.
199
200
201 Test 29: Text between two strings should not be string-faced.
202 "String1" between "String2"
203
204 Test 30: The ARG0 and USER0 macros don't exist.
205 $ARG0$
206 $USER0$
207
208 Test 31: Commented opening braces should not cause indentation.
209 # {
210 This line should not be indented.
211 ;{
212 Neither should this line.
213
214 Test 32: Commented closing braces should not close a block.
215 define host {
216 This is indented.
217 # This is just a comment }
218 So this should be indented too.
219 }
220 But not this.
221
222 Test 33: Double opening/closing braces shouldn't cause things
223 to go haywire.
224 define host {# {
225 #{}}}}}{}{{}}}{{;{}{}{}
226 Still normal indentation.
227 }#{}}}}}}}{{{{{{{{{{{{{{{
228 Here too.