-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacer_file.unit
330 lines (260 loc) · 75.3 KB
/
pacer_file.unit
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
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
#!/usr/local/bin/koios
# koios-polos (north star) -- customized c unit testing meta-program and mini-language
# program under test : gregg_2raw
# auto-generated script file converted from a previous script version
#23456789-12 123456789-123456789-123456789-12345 123456789-123456789-123456 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789- 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- - 123456789-123456789-
#==(verb)=== ===========(description)=========== =====(function)=========== ========================(arguments)================================================================= ==(test)== ==========================(results)================================================================= t ========(var)=======
PREP include the prototype headers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
incl include public header pacer.h - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#23456789-12 123456789-123456789-123456789-12345 123456789-123456789-123456 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789- 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- - 123456789-123456789-
#==(verb)=== ===========(description)=========== =====(function)=========== ========================(arguments)================================================================= ==(test)== ==========================(results)================================================================= t ========(var)=======
SCRP (FILE) verify openning and closing configuration file FILE__open, FILE__close ((01.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
code change the config file - - - - - - - - - - - - - strlcpy (my.conf, "/tmp/pacer.conf" , LEN_HUND);
code clear config file - - - - - - - - - - - - - system ("rm -f /tmp/pacer.conf");
COND attempt to read non-existant file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call open FILE__open i_lesser 0
COND attempt to close an un-openned file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call close FILE__close i_lesser 0
COND verify openning file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code create empty file - - - - - - - - - - - - - system ("touch /tmp/pacer.conf");
exec call open FILE__open i_equal 0
COND attempt to re-open file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call open FILE__open i_lesser 0
COND verify closing the file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call close FILE__close i_equal 0
COND attempt to close already closed file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call close FILE__close i_lesser 0
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.003)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code clear config file - - - - - - - - - - - - - system ("rm -f /tmp/pacer.conf");
exec stop testing PROG__unit_end i_equal 0
#23456789-12 123456789-123456789-123456789-12345 123456789-123456789-123456 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789- 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- - 123456789-123456789-
#==(verb)=== ===========(description)=========== =====(function)=========== ========================(arguments)================================================================= ==(test)== ==========================(results)================================================================= t ========(var)=======
SCRP (FILE) verify reading lines from configuration file FILE__read ((01.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
code change the config file - - - - - - - - - - - - - strlcpy (my.conf, "/tmp/pacer.conf" , LEN_HUND);
code clear config file - - - - - - - - - - - - - system ("rm -f /tmp/pacer.conf");
COND attempt to read an empty file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code create empty file - - - - - - - - - - - - - system ("touch /tmp/pacer.conf");
exec call open FILE__open i_equal 0
exec call read FILE__read i_lesser 0
exec call close FILE__close i_equal 0
COND verify read of a header line - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code add header - - - - - - - - - - - - - system ("echo ¶nice § description § ¦¶ > /tmp/pacer.conf");
exec call open FILE__open i_equal 0
exec call read FILE__read i_equal 'h'
exec call close FILE__close i_equal 0
COND verify read of a detail line - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code add detail - - - - - - - - - - - - - system ("echo ¶ step § description § ¦¶ > /tmp/pacer.conf");
exec call open FILE__open i_equal 0
exec call read FILE__read i_equal 'd'
exec call close FILE__close i_equal 0
COND attempt reading a blank file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code add blank - - - - - - - - - - - - - system ("echo ¶¦¶ > /tmp/pacer.conf");
exec call open FILE__open i_equal 0
exec call read FILE__read i_lesser 0
exec call close FILE__close i_equal 0
COND verify read of mixed lines - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code add blank - - - - - - - - - - - - - system ("echo ¶¦¶ > /tmp/pacer.conf");
code add blank - - - - - - - - - - - - - system ("echo ¶¦¶ >> /tmp/pacer.conf");
code add header - - - - - - - - - - - - - system ("echo ¶nice § description § ¦¶ >> /tmp/pacer.conf");
code add header - - - - - - - - - - - - - system ("echo ¶ step § description § ¦¶ >> /tmp/pacer.conf");
code add blank - - - - - - - - - - - - - system ("echo ¶¦¶ >> /tmp/pacer.conf");
code add detail - - - - - - - - - - - - - system ("echo ¶ step § description § ¦¶ >> /tmp/pacer.conf");
code add blank - - - - - - - - - - - - - system ("echo ¶¦¶ >> /tmp/pacer.conf");
exec call open FILE__open i_equal 0
exec call read FILE__read i_equal 'h'
exec call read FILE__read i_equal 'd'
exec call read FILE__read i_equal 'd'
exec call read FILE__read i_lesser 0
exec call close FILE__close i_equal 0
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.003)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code clear config file - - - - - - - - - - - - - system ("rm -f /tmp/pacer.conf");
exec stop testing PROG__unit_end i_equal 0
#23456789-12 123456789-123456789-123456789-12345 123456789-123456789-123456 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789- 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- - 123456789-123456789-
#==(verb)=== ===========(description)=========== =====(function)=========== ========================(arguments)================================================================= ==(test)== ==========================(results)================================================================= t ========(var)=======
SCRP (FILE) verify parsing headers FILE__header ((01.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
local create working variables - - - - - - - - - - - - - char x_title [LEN_LABEL] = "";
local create working variables - - - - - - - - - - - - - char x_desc [LEN_HUND] = "";
local create working variables - - - - - - - - - - - - - int x_chime = 0;
code change the config file - - - - - - - - - - - - - strlcpy (my.conf, "/tmp/pacer.conf" , LEN_HUND);
code clear config file - - - - - - - - - - - - - system ("rm -f /tmp/pacer.conf");
code create empty file - - - - - - - - - - - - - system ("touch /tmp/pacer.conf");
COND attempt before file open - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call header FILE__header "nice § 1 § description §" , x_title, &x_chime, x_desc i_lesser 0
echo ... review title - - - - - - - - - - - - - x_title s_equal
echo ... review chime - - - - - - - - - - - - - x_chime i_equal 0
echo ... review desc - - - - - - - - - - - - - x_desc s_equal
COND open file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call open FILE__open i_equal 0
COND verify parsing simple line - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call header FILE__header "nice § 1 § description §" , x_title, &x_chime, x_desc i_equal 0
echo ... review title - - - - - - - - - - - - - x_title s_equal nice
echo ... review chime - - - - - - - - - - - - - x_chime i_equal 1
echo ... review desc - - - - - - - - - - - - - x_desc s_equal description
COND attempt to parse a null - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call header FILE__header NULL , x_title, &x_chime, x_desc i_lesser 0
echo ... review title - - - - - - - - - - - - - x_title s_equal
echo ... review chime - - - - - - - - - - - - - x_chime i_equal 0
echo ... review desc - - - - - - - - - - - - - x_desc s_equal
COND verify parsing just a title - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call header FILE__header "another" , x_title, &x_chime, x_desc i_equal 0
echo ... review title - - - - - - - - - - - - - x_title s_equal another
echo ... review chime - - - - - - - - - - - - - x_chime i_equal 0
echo ... review desc - - - - - - - - - - - - - x_desc s_equal
COND attempt a super short title - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call header FILE__header "an" , x_title, &x_chime, x_desc i_lesser 0
echo ... review title - - - - - - - - - - - - - x_title s_equal
echo ... review chime - - - - - - - - - - - - - x_chime i_equal 0
echo ... review desc - - - - - - - - - - - - - x_desc s_equal
COND verify parsing a different line - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call header FILE__header "standing § 5s § zhan zhuang" , x_title, &x_chime, x_desc i_equal 0
echo ... review title - - - - - - - - - - - - - x_title s_equal standing
echo ... review chime - - - - - - - - - - - - - x_chime i_equal 5
echo ... review desc - - - - - - - - - - - - - x_desc s_equal zhan zhuang
COND attempt title with a space - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call header FILE__header "one two § 3s § testing" , x_title, &x_chime, x_desc i_lesser 0
echo ... review title - - - - - - - - - - - - - x_title s_equal
echo ... review chime - - - - - - - - - - - - - x_chime i_equal 0
echo ... review desc - - - - - - - - - - - - - x_desc s_equal
COND attempt title with other stuff - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call header FILE__header "one$two § 2s § testing" , x_title, &x_chime, x_desc i_lesser 0
exec call header FILE__header "a/goood § 2s § testing" , x_title, &x_chime, x_desc i_lesser 0
exec call header FILE__header "q(two) § 2s § testing" , x_title, &x_chime, x_desc i_lesser 0
exec call header FILE__header "22 § 2s § testing" , x_title, &x_chime, x_desc i_lesser 0
echo ... review title - - - - - - - - - - - - - x_title s_equal
echo ... review chime - - - - - - - - - - - - - x_chime i_equal 0
echo ... review desc - - - - - - - - - - - - - x_desc s_equal
COND verify using numbers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call header FILE__header "2test § 2s § testing" , x_title, &x_chime, x_desc i_equal 0
echo ... review title - - - - - - - - - - - - - x_title s_equal 2test
echo ... review chime - - - - - - - - - - - - - x_chime i_equal 2
echo ... review desc - - - - - - - - - - - - - x_desc s_equal testing
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.003)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call close FILE__close i_equal 0
code clear config file - - - - - - - - - - - - - system ("rm -f /tmp/pacer.conf");
exec stop testing PROG__unit_end i_equal 0
#23456789-12 123456789-123456789-123456789-12345 123456789-123456789-123456 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789- 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- - 123456789-123456789-
#==(verb)=== ===========(description)=========== =====(function)=========== ========================(arguments)================================================================= ==(test)== ==========================(results)================================================================= t ========(var)=======
SCRP (FILE) verify parsing details FILE__detail ((01.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
local create working variables - - - - - - - - - - - - - int x_dur = 0;
local create working variables - - - - - - - - - - - - - char x_terse [LEN_TERSE] = "";
local create working variables - - - - - - - - - - - - - char x_desc [LEN_DESC] = "";
code change the config file - - - - - - - - - - - - - strlcpy (my.conf, "/tmp/pacer.conf" , LEN_HUND);
code clear config file - - - - - - - - - - - - - system ("rm -f /tmp/pacer.conf");
code create empty file - - - - - - - - - - - - - system ("touch /tmp/pacer.conf");
COND attempt before file open - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call detail FILE__detail NULL , &x_dur, x_terse, x_desc i_lesser 0
echo ... review duration - - - - - - - - - - - - - x_dur i_equal 0
echo ... review title - - - - - - - - - - - - - x_terse s_equal
echo ... review desc - - - - - - - - - - - - - x_desc s_equal
COND open file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call open FILE__open i_equal 0
COND verify parsing simple line - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call detail FILE__detail " 1 § test § description §" , &x_dur, x_terse, x_desc i_equal 0
echo ... review duration - - - - - - - - - - - - - x_dur i_equal 1
echo ... review title - - - - - - - - - - - - - x_terse s_equal test
echo ... review desc - - - - - - - - - - - - - x_desc s_equal description
COND attempt a null line - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call detail FILE__detail NULL , &x_dur, x_terse, x_desc i_lesser 0
echo ... review duration - - - - - - - - - - - - - x_dur i_equal 0
echo ... review title - - - - - - - - - - - - - x_terse s_equal
echo ... review desc - - - - - - - - - - - - - x_desc s_equal
COND verify with interesting durations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call detail FILE__detail " 5s § test § description §" , &x_dur, x_terse, x_desc i_equal 0
echo ... review duration - - - - - - - - - - - - - x_dur i_equal 5
exec call detail FILE__detail " 3m § test § description §" , &x_dur, x_terse, x_desc i_equal 0
echo ... review duration - - - - - - - - - - - - - x_dur i_equal 180
exec call detail FILE__detail " 0.5m § test § description §" , &x_dur, x_terse, x_desc i_equal 0
echo ... review duration - - - - - - - - - - - - - x_dur i_equal 30
exec call detail FILE__detail " 1h § test § description §" , &x_dur, x_terse, x_desc i_equal 0
echo ... review duration - - - - - - - - - - - - - x_dur i_equal 3600
COND attempt with bad durations - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call detail FILE__detail " 4x § dest § description §" , &x_dur, x_terse, x_desc i_lesser 0
echo ... review duration - - - - - - - - - - - - - x_dur i_equal 0
echo ... review title - - - - - - - - - - - - - x_terse s_equal
echo ... review desc - - - - - - - - - - - - - x_desc s_equal
exec call detail FILE__detail " ? § dest § description §" , &x_dur, x_terse, x_desc i_lesser 0
exec call detail FILE__detail " hi § dest § description §" , &x_dur, x_terse, x_desc i_lesser 0
COND attempt with bad terses - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call detail FILE__detail " 1 § hi? § description §" , &x_dur, x_terse, x_desc i_lesser 0
echo ... review duration - - - - - - - - - - - - - x_dur i_equal 0
echo ... review title - - - - - - - - - - - - - x_terse s_equal
echo ... review desc - - - - - - - - - - - - - x_desc s_equal
exec call detail FILE__detail " 1 § two i § description §" , &x_dur, x_terse, x_desc i_lesser 0
exec call detail FILE__detail " 1 § (be) § description §" , &x_dur, x_terse, x_desc i_lesser 0
exec call detail FILE__detail " 1 § 5 § description §" , &x_dur, x_terse, x_desc i_lesser 0
COND verify with numbers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call detail FILE__detail " 1 § n1ce § description §" , &x_dur, x_terse, x_desc i_equal 0
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.003)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call close FILE__close i_equal 0
code clear config file - - - - - - - - - - - - - system ("rm -f /tmp/pacer.conf");
exec stop testing PROG__unit_end i_equal 0
#23456789-12 123456789-123456789-123456789-12345 123456789-123456789-123456 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- 123456789- 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- - 123456789-123456789-
#==(verb)=== ===========(description)=========== =====(function)=========== ========================(arguments)================================================================= ==(test)== ==========================(results)================================================================= t ========(var)=======
SCRP (FILE) verify parsing details FILE__detail ((01.---)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
COND initialize the testing environment - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.001)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec start testing PROG__unit_quiet i_equal 0
code change the config file - - - - - - - - - - - - - strlcpy (my.conf, "/tmp/pacer.conf" , LEN_HUND);
code clear config file - - - - - - - - - - - - - system ("rm -f /tmp/pacer.conf");
COND attempt to find target in non-existant file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call import FILE_import "myself" i_lesser 0
COND attempt to find target in empty file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code create empty file - - - - - - - - - - - - - system ("touch /tmp/pacer.conf");
exec call import FILE_import "myself" i_lesser 0
COND create file with several headers - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code add blank - - - - - - - - - - - - - system ("echo ¶¦¶ > /tmp/pacer.conf");
code add blank - - - - - - - - - - - - - system ("echo ¶¦¶ >> /tmp/pacer.conf");
code add header - - - - - - - - - - - - - system ("echo ¶goodness § 1 § description § ¦¶ >> /tmp/pacer.conf");
code add detail - - - - - - - - - - - - - system ("echo ¶ 2s § two § description § ¦¶ >> /tmp/pacer.conf");
code add header - - - - - - - - - - - - - system ("echo ¶myself § 5 § description § ¦¶ >> /tmp/pacer.conf");
code add header - - - - - - - - - - - - - system ("echo ¶ x § three § description § ¦¶ >> /tmp/pacer.conf");
code add header - - - - - - - - - - - - - system ("echo ¶ 1 § tons § description § ¦¶ >> /tmp/pacer.conf");
code add header - - - - - - - - - - - - - system ("echo ¶clubby § 2m § description § ¦¶ >> /tmp/pacer.conf");
code add header - - - - - - - - - - - - - system ("echo ¶ 10m § nine § description § ¦¶ >> /tmp/pacer.conf");
code add header - - - - - - - - - - - - - system ("echo ¶fun § 0 § description § ¦¶ >> /tmp/pacer.conf");
code add header - - - - - - - - - - - - - system ("echo ¶happy § 0 § description § ¦¶ >> /tmp/pacer.conf");
code add header - - - - - - - - - - - - - system ("echo ¶ 5s § four § description § ¦¶ >> /tmp/pacer.conf");
code add detail - - - - - - - - - - - - - system ("echo ¶ 1m § five § description § ¦¶ >> /tmp/pacer.conf");
code add blank - - - - - - - - - - - - - system ("echo ¶¦¶ >> /tmp/pacer.conf");
COND verify finding a real target - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call import FILE_import "happy" i_equal 0
get ... header PROG__unit "header" , 0 s_equal PROG header : 2 5åhappyæ 11ådescriptionæ 65 21.02
get ... header PROG__unit "detail" , 0 s_equal PROG detail ( 0) : 1 4åfouræ 11ådescriptionæ 5
get ... header PROG__unit "detail" , 1 s_equal PROG detail ( 1) : 2 4åfiveæ 11ådescriptionæ 60
COND attempt to find null/empty/short targets - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call import FILE_import NULL i_lesser 0
exec call import FILE_import "" i_lesser 0
exec call import FILE_import "ab" i_lesser 0
COND attempt a non-existant target - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call import FILE_import "toejam" i_lesser 0
get ... header PROG__unit "header" , 0 s_equal PROG header : · · · ·
get ... header PROG__unit "detail" , 0 s_equal PROG detail ( 0) : · · · ·
get ... header PROG__unit "detail" , 1 s_equal PROG detail ( 1) : · · · ·
COND verify another real target - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call import FILE_import "goodness" i_equal 0
get ... header PROG__unit "header" , 0 s_equal PROG header : 1 8ågoodnessæ 11ådescriptionæ 2 683.00
get ... header PROG__unit "detail" , 0 s_equal PROG detail ( 0) : 1 3åtwoæ 11ådescriptionæ 2
COND attempt good header with corrupt detail - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call import FILE_import "myself" i_lesser 0
get ... header PROG__unit "header" , 0 s_equal PROG header : · · · ·
get ... header PROG__unit "detail" , 0 s_equal PROG detail ( 0) : · · · ·
get ... header PROG__unit "detail" , 1 s_equal PROG detail ( 1) : · · · ·
COND attempt good header with no detail - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call import FILE_import "fun" i_lesser 0
get ... header PROG__unit "header" , 0 s_equal PROG header : · · · ·
get ... header PROG__unit "detail" , 0 s_equal PROG detail ( 0) : · · · ·
get ... header PROG__unit "detail" , 1 s_equal PROG detail ( 1) : · · · ·
COND verify another real target - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((01.002)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exec call import FILE_import "clubby" i_equal 0
get ... header PROG__unit "header" , 0 s_equal PROG header : 1 6åclubbyæ 11ådescriptionæ 600 2.28
get ... header PROG__unit "detail" , 0 s_equal PROG detail ( 0) : 1 4ånineæ 11ådescriptionæ 600
COND complete testing - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ((03.003)) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
code clear config file - - - - - - - - - - - - - system ("rm -f /tmp/pacer.conf");
exec stop testing PROG__unit_end i_equal 0