File: mapdata.cf

package info (click to toggle)
cfengine3 3.24.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 37,552 kB
  • sloc: ansic: 163,161; sh: 10,296; python: 2,950; makefile: 1,744; lex: 784; yacc: 633; perl: 211; pascal: 157; xml: 21; sed: 13
file content (335 lines) | stat: -rw-r--r-- 30,396 bytes parent folder | download | duplicates (5)
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
328
329
330
331
332
333
334
335
#######################################################
#
# Test mapdata()
#
#######################################################

body common control
{
      inputs => { "../../default.cf.sub" };
      bundlesequence  => { default("$(this.promise_filename)") };
      version => "1.0";
}

#######################################################

bundle agent init
{
}

#######################################################

bundle agent test
{
  vars:
      "load1" data => parsejson('[ 1, 2, 3]');
      "load2" slist => { "eleme\"nt1", "element2", "element3" };
      "load3" data => parsejson('{ "x\\"x": "y\\"y" }');
      "load4" data => parsejson('[]');
      "load5[mykey]" slist => { "myvalue" };
      "load5[anotherkey]" string => "anothervalue";
      "load5[lastkey!]" slist => { "o\"ne", "two", "three" };
      "load6" data => parsejson('{ "a": { "b": "c" } }');

      "static[x]" string => "xvalue";
      "static[x\"x]" string => "xxvalue";
      "static[0]" string => "0value";
      "static[1]" string => "1value";
      "static[2]" string => "2value";
      "static[lastkey!]" string => "lastvalue";
      "static[anotherkey]" string => "anothervalue";
      "static[mykey]" string => "myvalue";
      "static[a]" string => "avalue";

      "spec1" string => "key = $(this.k)";
      "spec2" string => "key = $(this.k), value = ${this.v}";
      "spec3" string => "key = $(this.k), key2 = $(this.k[1]), value = ${this.v}";
      "spec4" string => "xvalue should be $(static[$(this.k)])";

      "jsonspec1" string => '{ "key": "$(this.k)", "value": "$(this.v)"';
      "jsonspec2" string => '{ "key": "$(this.k)", "value": "$(this.v)" }';
      "jsonspec3" string => '[ "$(this.k)", "$(this.v)" ]';
      "jsonspec4" string => '{ "key": "$(this.k)", "key2": "$(this.k[1])", "value": "$(this.v)" }';

      "X" slist => { "1", "2", "3", "4", "5", "6" };
      "Y" slist => { "1", "2", "3", "4" };

      "mapdata_none_$(X)_$(Y)" data => mapdata("none", "$(spec$(Y))", "load$(X)");
      "mapdata_none_str_$(X)_$(Y)" string => format("%S", "mapdata_none_$(X)_$(Y)");

      "mapdata_canonify_$(X)_$(Y)" data => mapdata("canonify", "$(spec$(Y))", "load$(X)");
      "mapdata_canonify_str_$(X)_$(Y)" string => format("%S", "mapdata_canonify_$(X)_$(Y)");

      "mapdata_canonify_eval_$(X)_$(Y)" data => mapdata("canonify", concat("$(spec$(Y))"), "load$(X)");
      "mapdata_canonify_eval_str_$(X)_$(Y)" string => format("%S", "mapdata_canonify_eval_$(X)_$(Y)");

      "mapdata_json_$(X)_$(Y)" data => mapdata("json", "$(jsonspec$(Y))", "load$(X)");
      "mapdata_json_str_$(X)_$(Y)" string => format("%S", "mapdata_json_$(X)_$(Y)");

      "bad1" data => mapdata("json", "", missingvar);

      "justastring" string => "me";
      "bad3" data => mapdata("json", "", justastring);

  classes:
      'mapdata_none_1_1_ok' and => { regcmp('.*"key = 0".*', '$(mapdata_none_str_1_1)'),
                                     regcmp('.*"key = 1".*', '$(mapdata_none_str_1_1)'),
                                     regcmp('.*"key = 2".*', '$(mapdata_none_str_1_1)') };
      'mapdata_none_1_2_ok' and => { regcmp('.*"key = 0, value = 1".*', '$(mapdata_none_str_1_2)'),
                                     regcmp('.*"key = 1, value = 2".*', '$(mapdata_none_str_1_2)'),
                                     regcmp('.*"key = 2, value = 3".*', '$(mapdata_none_str_1_2)') };
      'mapdata_none_1_3_ok' and => { regcmp('.*"key = 0, key2 = \$\(this.k\[1\]\), value = 1".*', '$(mapdata_none_str_1_3)'),
                                     regcmp('.*"key = 1, key2 = \$\(this.k\[1\]\), value = 2".*', '$(mapdata_none_str_1_3)'),
                                     regcmp('.*"key = 2, key2 = \$\(this.k\[1\]\), value = 3".*', '$(mapdata_none_str_1_3)') };
      'mapdata_none_1_4_ok' and => { regcmp('.*"xvalue should be 0value".*', '$(mapdata_none_str_1_4)'),
                                     regcmp('.*"xvalue should be 1value".*', '$(mapdata_none_str_1_4)'),
                                     regcmp('.*"xvalue should be 2value".*', '$(mapdata_none_str_1_4)') };
      'mapdata_none_2_1_ok' and => { regcmp('.*"key = 0".*', '$(mapdata_none_str_2_1)'),
                                     regcmp('.*"key = 1".*', '$(mapdata_none_str_2_1)'),
                                     regcmp('.*"key = 2".*', '$(mapdata_none_str_2_1)') };
      'mapdata_none_2_2_ok' and => { regcmp('.*"key = 0, value = eleme\\\\"nt1".*', '$(mapdata_none_str_2_2)'),
                                     regcmp('.*"key = 1, value = element2".*', '$(mapdata_none_str_2_2)'),
                                     regcmp('.*"key = 2, value = element3".*', '$(mapdata_none_str_2_2)') };
      'mapdata_none_2_3_ok' and => { regcmp('.*"key = 0, key2 = \$\(this.k\[1\]\), value = eleme\\\\"nt1".*', '$(mapdata_none_str_2_3)'),
                                     regcmp('.*"key = 1, key2 = \$\(this.k\[1\]\), value = element2".*', '$(mapdata_none_str_2_3)'),
                                     regcmp('.*"key = 2, key2 = \$\(this.k\[1\]\), value = element3".*', '$(mapdata_none_str_2_3)') };
      'mapdata_none_2_4_ok' and => { regcmp('.*"xvalue should be 0value".*', '$(mapdata_none_str_2_4)'),
                                     regcmp('.*"xvalue should be 1value".*', '$(mapdata_none_str_2_4)'),
                                     regcmp('.*"xvalue should be 2value".*', '$(mapdata_none_str_2_4)') };
      'mapdata_none_3_1_ok' and => { regcmp('.*"key = x\\\\"x".*', '$(mapdata_none_str_3_1)') };
      'mapdata_none_3_2_ok' and => { regcmp('.*"key = x\\\\"x, value = y\\\\"y".*', '$(mapdata_none_str_3_2)') };
      'mapdata_none_3_3_ok' and => { regcmp('.*"key = x\\\\"x, key2 = \$\(this.k\[1\]\), value = y\\\\"y".*', '$(mapdata_none_str_3_3)') };
      'mapdata_none_3_4_ok' and => { regcmp('.*"xvalue should be xxvalue".*', '$(mapdata_none_str_3_4)') };
      'mapdata_none_4_1_ok' expression => strcmp('$(mapdata_none_str_4_1)', '[]');
      'mapdata_none_4_2_ok' expression => strcmp('$(mapdata_none_str_4_1)', '[]');
      'mapdata_none_4_3_ok' expression => strcmp('$(mapdata_none_str_4_1)', '[]');
      'mapdata_none_4_4_ok' expression => strcmp('$(mapdata_none_str_4_1)', '[]');
      'mapdata_none_5_1_ok' and => { regcmp('.*"key = mykey".*', '$(mapdata_none_str_5_1)'),
                                     regcmp('.*"key = anotherkey".*', '$(mapdata_none_str_5_1)'),
                                     regcmp('.*"key = lastkey!".*', '$(mapdata_none_str_5_1)') };
      'mapdata_none_5_2_ok' and => { regcmp('.*"key = mykey, value = myvalue".*', '$(mapdata_none_str_5_2)'),
                                     regcmp('.*"key = anotherkey, value = anothervalue".*', '$(mapdata_none_str_5_2)'),
                                     regcmp('.*"key = lastkey!, value = o\\\\"ne".*', '$(mapdata_none_str_5_2)'),
                                     regcmp('.*"key = lastkey!, value = two".*', '$(mapdata_none_str_5_2)'),
                                     regcmp('.*"key = lastkey!, value = three".*', '$(mapdata_none_str_5_2)') };
      'mapdata_none_5_3_ok' and => { regcmp('.*"key = mykey, key2 = \$\(this.k\[1\]\), value = myvalue".*', '$(mapdata_none_str_5_3)'),
                                     regcmp('.*"key = anotherkey, key2 = \$\(this.k\[1\]\), value = anothervalue".*', '$(mapdata_none_str_5_3)'),
                                     regcmp('.*"key = lastkey!, key2 = \$\(this.k\[1\]\), value = o\\\\"ne".*', '$(mapdata_none_str_5_3)'),
                                     regcmp('.*"key = lastkey!, key2 = \$\(this.k\[1\]\), value = two".*', '$(mapdata_none_str_5_3)'),
                                     regcmp('.*"key = lastkey!, key2 = \$\(this.k\[1\]\), value = three".*', '$(mapdata_none_str_5_3)') };
      'mapdata_none_5_4_ok' and => { regcmp('.*"xvalue should be myvalue".*', '$(mapdata_none_str_5_4)'),
                                     regcmp('.*"xvalue should be anothervalue".*', '$(mapdata_none_str_5_4)'),
                                     regcmp('.*"xvalue should be lastvalue".*', '$(mapdata_none_str_5_4)') };
      'mapdata_none_6_1_ok' and => { regcmp('.*"key = a".*', '$(mapdata_none_str_6_1)') };
      'mapdata_none_6_2_ok' and => { regcmp('.*"key = a, value = c".*', '$(mapdata_none_str_6_2)') };
      'mapdata_none_6_3_ok' and => { regcmp('.*"key = a, key2 = b, value = c".*', '$(mapdata_none_str_6_3)') };
      'mapdata_none_6_4_ok' and => { regcmp('.*"xvalue should be avalue".*', '$(mapdata_none_str_6_4)') };

      'mapdata_canonify_1_1_ok' and => { regcmp('.*"key___0".*', '$(mapdata_canonify_str_1_1)'),
                                         regcmp('.*"key___1".*', '$(mapdata_canonify_str_1_1)'),
                                         regcmp('.*"key___2".*', '$(mapdata_canonify_str_1_1)') };
      'mapdata_canonify_1_2_ok' and => { regcmp('.*"key___0__value___1".*', '$(mapdata_canonify_str_1_2)'),
                                         regcmp('.*"key___1__value___2".*', '$(mapdata_canonify_str_1_2)'),
                                         regcmp('.*"key___2__value___3".*', '$(mapdata_canonify_str_1_2)') };
      'mapdata_canonify_1_3_ok' and => { regcmp('.*"key___0__key2_____this_k_1____value___1".*', '$(mapdata_canonify_str_1_3)'),
                                         regcmp('.*"key___1__key2_____this_k_1____value___2".*', '$(mapdata_canonify_str_1_3)'),
                                         regcmp('.*"key___2__key2_____this_k_1____value___3".*', '$(mapdata_canonify_str_1_3)') };
      'mapdata_canonify_1_4_ok' and => { regcmp('.*"xvalue_should_be_0value".*', '$(mapdata_canonify_str_1_4)'),
                                         regcmp('.*"xvalue_should_be_1value".*', '$(mapdata_canonify_str_1_4)'),
                                         regcmp('.*"xvalue_should_be_2value".*', '$(mapdata_canonify_str_1_4)') };
      'mapdata_canonify_2_1_ok' and => { regcmp('.*"key___0".*', '$(mapdata_canonify_str_2_1)'),
                                         regcmp('.*"key___1".*', '$(mapdata_canonify_str_2_1)'),
                                         regcmp('.*"key___2".*', '$(mapdata_canonify_str_2_1)') };
      'mapdata_canonify_2_2_ok' and => { regcmp('.*"key___0__value___eleme_nt1".*', '$(mapdata_canonify_str_2_2)'),
                                         regcmp('.*"key___1__value___element2".*', '$(mapdata_canonify_str_2_2)'),
                                         regcmp('.*"key___2__value___element3".*', '$(mapdata_canonify_str_2_2)') };
      'mapdata_canonify_2_3_ok' and => { regcmp('.*"key___0__key2_____this_k_1____value___eleme_nt1".*', '$(mapdata_canonify_str_2_3)'),
                                         regcmp('.*"key___1__key2_____this_k_1____value___element2".*', '$(mapdata_canonify_str_2_3)'),
                                         regcmp('.*"key___2__key2_____this_k_1____value___element3".*', '$(mapdata_canonify_str_2_3)') };
      'mapdata_canonify_2_4_ok' and => { regcmp('.*"xvalue_should_be_0value".*', '$(mapdata_canonify_str_2_4)'),
                                         regcmp('.*"xvalue_should_be_1value".*', '$(mapdata_canonify_str_2_4)'),
                                         regcmp('.*"xvalue_should_be_2value".*', '$(mapdata_canonify_str_2_4)') };
      'mapdata_canonify_3_1_ok' and => { regcmp('.*"key___x_x".*', '$(mapdata_canonify_str_3_1)') };
      'mapdata_canonify_3_2_ok' and => { regcmp('.*"key___x_x__value___y_y".*', '$(mapdata_canonify_str_3_2)') };
      'mapdata_canonify_3_3_ok' and => { regcmp('.*"key___x_x__key2_____this_k_1____value___y_y".*', '$(mapdata_canonify_str_3_3)') };
      'mapdata_canonify_3_4_ok' and => { regcmp('.*"xvalue_should_be_xxvalue".*', '$(mapdata_canonify_str_3_4)') };
      'mapdata_canonify_4_1_ok' expression => strcmp('$(mapdata_canonify_str_4_1)', '[]');
      'mapdata_canonify_4_2_ok' expression => strcmp('$(mapdata_canonify_str_4_1)', '[]');
      'mapdata_canonify_4_3_ok' expression => strcmp('$(mapdata_canonify_str_4_1)', '[]');
      'mapdata_canonify_4_4_ok' expression => strcmp('$(mapdata_canonify_str_4_1)', '[]');
      'mapdata_canonify_5_1_ok' and => { regcmp('.*"key___mykey".*', '$(mapdata_canonify_str_5_1)'),
                                         regcmp('.*"key___anotherkey".*', '$(mapdata_canonify_str_5_1)'),
                                         regcmp('.*"key___lastkey_".*', '$(mapdata_canonify_str_5_1)') };
      'mapdata_canonify_5_2_ok' and => { regcmp('.*"key___mykey__value___myvalue".*', '$(mapdata_canonify_str_5_2)'),
                                         regcmp('.*"key___anotherkey__value___anothervalue".*', '$(mapdata_canonify_str_5_2)'),
                                         regcmp('.*"key___lastkey___value___o_ne".*', '$(mapdata_canonify_str_5_2)'),
                                         regcmp('.*"key___lastkey___value___two".*', '$(mapdata_canonify_str_5_2)'),
                                         regcmp('.*"key___lastkey___value___three".*', '$(mapdata_canonify_str_5_2)') };
      'mapdata_canonify_5_3_ok' and => { regcmp('.*"key___mykey__key2_____this_k_1____value___myvalue".*', '$(mapdata_canonify_str_5_3)'),
                                         regcmp('.*"key___anotherkey__key2_____this_k_1____value___anothervalue".*', '$(mapdata_canonify_str_5_3)'),
                                         regcmp('.*"key___lastkey___key2_____this_k_1____value___o_ne".*', '$(mapdata_canonify_str_5_3)'),
                                         regcmp('.*"key___lastkey___key2_____this_k_1____value___two".*', '$(mapdata_canonify_str_5_3)'),
                                         regcmp('.*"key___lastkey___key2_____this_k_1____value___three".*', '$(mapdata_canonify_str_5_3)') };
      'mapdata_canonify_5_4_ok' and => { regcmp('.*"xvalue_should_be_myvalue".*', '$(mapdata_canonify_str_5_4)'),
                                         regcmp('.*"xvalue_should_be_anothervalue".*', '$(mapdata_canonify_str_5_4)'),
                                         regcmp('.*"xvalue_should_be_lastvalue".*', '$(mapdata_canonify_str_5_4)') };
      'mapdata_canonify_6_1_ok' and => { regcmp('.*"key___a".*', '$(mapdata_canonify_str_6_1)') };
      'mapdata_canonify_6_2_ok' and => { regcmp('.*"key___a__value___c".*', '$(mapdata_canonify_str_6_2)') };
      'mapdata_canonify_6_3_ok' and => { regcmp('.*"key___a__key2___b__value___c".*', '$(mapdata_canonify_str_6_3)') };
      'mapdata_canonify_6_4_ok' and => { regcmp('.*"xvalue_should_be_avalue".*', '$(mapdata_canonify_str_6_4)') };

      'mapdata_canonify_eval_1_1_ok' and => { regcmp('.*"key___0".*', '$(mapdata_canonify_eval_str_1_1)'),
                                              regcmp('.*"key___1".*', '$(mapdata_canonify_eval_str_1_1)'),
                                              regcmp('.*"key___2".*', '$(mapdata_canonify_eval_str_1_1)') };
      'mapdata_canonify_eval_1_2_ok' and => { regcmp('.*"key___0__value___1".*', '$(mapdata_canonify_eval_str_1_2)'),
                                              regcmp('.*"key___1__value___2".*', '$(mapdata_canonify_eval_str_1_2)'),
                                              regcmp('.*"key___2__value___3".*', '$(mapdata_canonify_eval_str_1_2)') };
      'mapdata_canonify_eval_1_3_ok' and => { regcmp('.*"key___0__key2_____this_k_1____value___1".*', '$(mapdata_canonify_eval_str_1_3)'),
                                              regcmp('.*"key___1__key2_____this_k_1____value___2".*', '$(mapdata_canonify_eval_str_1_3)'),
                                              regcmp('.*"key___2__key2_____this_k_1____value___3".*', '$(mapdata_canonify_eval_str_1_3)') };
      'mapdata_canonify_eval_1_4_ok' and => { regcmp('.*"xvalue_should_be_0value".*', '$(mapdata_canonify_eval_str_1_4)'),
                                              regcmp('.*"xvalue_should_be_1value".*', '$(mapdata_canonify_eval_str_1_4)'),
                                              regcmp('.*"xvalue_should_be_2value".*', '$(mapdata_canonify_eval_str_1_4)') };
      'mapdata_canonify_eval_2_1_ok' and => { regcmp('.*"key___0".*', '$(mapdata_canonify_eval_str_2_1)'),
                                              regcmp('.*"key___1".*', '$(mapdata_canonify_eval_str_2_1)'),
                                              regcmp('.*"key___2".*', '$(mapdata_canonify_eval_str_2_1)') };
      'mapdata_canonify_eval_2_2_ok' and => { regcmp('.*"key___0__value___eleme_nt1".*', '$(mapdata_canonify_eval_str_2_2)'),
                                              regcmp('.*"key___1__value___element2".*', '$(mapdata_canonify_eval_str_2_2)'),
                                              regcmp('.*"key___2__value___element3".*', '$(mapdata_canonify_eval_str_2_2)') };
      'mapdata_canonify_eval_2_3_ok' and => { regcmp('.*"key___0__key2_____this_k_1____value___eleme_nt1".*', '$(mapdata_canonify_eval_str_2_3)'),
                                              regcmp('.*"key___1__key2_____this_k_1____value___element2".*', '$(mapdata_canonify_eval_str_2_3)'),
                                              regcmp('.*"key___2__key2_____this_k_1____value___element3".*', '$(mapdata_canonify_eval_str_2_3)') };
      'mapdata_canonify_eval_2_4_ok' and => { regcmp('.*"xvalue_should_be_0value".*', '$(mapdata_canonify_eval_str_2_4)'),
                                              regcmp('.*"xvalue_should_be_1value".*', '$(mapdata_canonify_eval_str_2_4)'),
                                              regcmp('.*"xvalue_should_be_2value".*', '$(mapdata_canonify_eval_str_2_4)') };
      'mapdata_canonify_eval_3_1_ok' and => { regcmp('.*"key___x_x".*', '$(mapdata_canonify_eval_str_3_1)') };
      'mapdata_canonify_eval_3_2_ok' and => { regcmp('.*"key___x_x__value___y_y".*', '$(mapdata_canonify_eval_str_3_2)') };
      'mapdata_canonify_eval_3_3_ok' and => { regcmp('.*"key___x_x__key2_____this_k_1____value___y_y".*', '$(mapdata_canonify_eval_str_3_3)') };
      'mapdata_canonify_eval_3_4_ok' and => { regcmp('.*"xvalue_should_be_xxvalue".*', '$(mapdata_canonify_eval_str_3_4)') };
      'mapdata_canonify_eval_4_1_ok' expression => strcmp('$(mapdata_canonify_eval_str_4_1)', '[]');
      'mapdata_canonify_eval_4_2_ok' expression => strcmp('$(mapdata_canonify_eval_str_4_1)', '[]');
      'mapdata_canonify_eval_4_3_ok' expression => strcmp('$(mapdata_canonify_eval_str_4_1)', '[]');
      'mapdata_canonify_eval_4_4_ok' expression => strcmp('$(mapdata_canonify_eval_str_4_1)', '[]');
      'mapdata_canonify_eval_5_1_ok' and => { regcmp('.*"key___mykey".*', '$(mapdata_canonify_eval_str_5_1)'),
                                              regcmp('.*"key___anotherkey".*', '$(mapdata_canonify_eval_str_5_1)'),
                                              regcmp('.*"key___lastkey_".*', '$(mapdata_canonify_eval_str_5_1)') };
      'mapdata_canonify_eval_5_2_ok' and => { regcmp('.*"key___mykey__value___myvalue".*', '$(mapdata_canonify_eval_str_5_2)'),
                                              regcmp('.*"key___anotherkey__value___anothervalue".*', '$(mapdata_canonify_eval_str_5_2)'),
                                              regcmp('.*"key___lastkey___value___o_ne".*', '$(mapdata_canonify_eval_str_5_2)'),
                                              regcmp('.*"key___lastkey___value___two".*', '$(mapdata_canonify_eval_str_5_2)'),
                                              regcmp('.*"key___lastkey___value___three".*', '$(mapdata_canonify_eval_str_5_2)') };
      'mapdata_canonify_eval_5_3_ok' and => { regcmp('.*"key___mykey__key2_____this_k_1____value___myvalue".*', '$(mapdata_canonify_eval_str_5_3)'),
                                              regcmp('.*"key___anotherkey__key2_____this_k_1____value___anothervalue".*',
                                                     '$(mapdata_canonify_eval_str_5_3)'),
                                              regcmp('.*"key___lastkey___key2_____this_k_1____value___o_ne".*', '$(mapdata_canonify_eval_str_5_3)'),
                                              regcmp('.*"key___lastkey___key2_____this_k_1____value___two".*', '$(mapdata_canonify_eval_str_5_3)'),
                                              regcmp('.*"key___lastkey___key2_____this_k_1____value___three".*', '$(mapdata_canonify_eval_str_5_3)') };
      'mapdata_canonify_eval_5_4_ok' and => { regcmp('.*"xvalue_should_be_myvalue".*', '$(mapdata_canonify_eval_str_5_4)'),
                                              regcmp('.*"xvalue_should_be_anothervalue".*', '$(mapdata_canonify_eval_str_5_4)'),
                                              regcmp('.*"xvalue_should_be_lastvalue".*', '$(mapdata_canonify_eval_str_5_4)') };
      'mapdata_canonify_eval_6_1_ok' and => { regcmp('.*"key___a".*', '$(mapdata_canonify_eval_str_6_1)') };
      'mapdata_canonify_eval_6_2_ok' and => { regcmp('.*"key___a__value___c".*', '$(mapdata_canonify_eval_str_6_2)') };
      'mapdata_canonify_eval_6_3_ok' and => { regcmp('.*"key___a__key2___b__value___c".*', '$(mapdata_canonify_eval_str_6_3)') };
      'mapdata_canonify_eval_6_4_ok' and => { regcmp('.*"xvalue_should_be_avalue".*', '$(mapdata_canonify_eval_str_6_4)') };

      'mapdata_json_1_1_ok' expression => strcmp('$(mapdata_json_str_1_1)', '[]');
      'mapdata_json_1_2_ok' and => { regcmp('.*\{"key":"0","value":"1"\}.*', '$(mapdata_json_str_1_2)'),
                                     regcmp('.*\{"key":"1","value":"2"\}.*', '$(mapdata_json_str_1_2)'),
                                     regcmp('.*\{"key":"2","value":"3"\}.*', '$(mapdata_json_str_1_2)') };
      'mapdata_json_1_3_ok' and => { regcmp('.*\["0","1"\].*', '$(mapdata_json_str_1_3)'),
                                     regcmp('.*\["1","2"\].*', '$(mapdata_json_str_1_3)'),
                                     regcmp('.*\["2","3"\].*', '$(mapdata_json_str_1_3)') };
      'mapdata_json_1_4_ok' and => { regcmp('.*\{"key":"0","key2":"\$\(this.k\[1\]\)","value":"1"\}.*', '$(mapdata_json_str_1_4)'),
                                     regcmp('.*\{"key":"1","key2":"\$\(this.k\[1\]\)","value":"2"\}.*', '$(mapdata_json_str_1_4)'),
                                     regcmp('.*\{"key":"2","key2":"\$\(this.k\[1\]\)","value":"3"\}.*', '$(mapdata_json_str_1_4)') };
      'mapdata_json_2_1_ok' expression => strcmp('$(mapdata_json_str_2_1)', '[]');
      'mapdata_json_2_2_ok' and => { regcmp('.*\{"key":"0","value":"eleme\\\\"nt1"\}.*', '$(mapdata_json_str_2_2)'),
                                     regcmp('.*\{"key":"1","value":"element2"\}.*', '$(mapdata_json_str_2_2)'),
                                     regcmp('.*\{"key":"2","value":"element3"\}.*', '$(mapdata_json_str_2_2)') };
      'mapdata_json_2_3_ok' and => { regcmp('.*\["0","eleme\\\\"nt1"\].*', '$(mapdata_json_str_2_3)'),
                                     regcmp('.*\["1","element2"\].*', '$(mapdata_json_str_2_3)'),
                                     regcmp('.*\["2","element3"\].*', '$(mapdata_json_str_2_3)') };
      'mapdata_json_2_4_ok' and => { regcmp('.*\{"key":"0","key2":"\$\(this.k\[1\]\)","value":"eleme\\\\"nt1"\}.*', '$(mapdata_json_str_2_4)'),
                                     regcmp('.*\{"key":"1","key2":"\$\(this.k\[1\]\)","value":"element2"\}.*', '$(mapdata_json_str_2_4)'),
                                     regcmp('.*\{"key":"2","key2":"\$\(this.k\[1\]\)","value":"element3"\}.*', '$(mapdata_json_str_2_4)') };
      'mapdata_json_3_1_ok' expression => strcmp('$(mapdata_json_str_3_1)', '[]');
      'mapdata_json_3_2_ok' and => { regcmp('.*\{"key":"x\\\\"x","value":"y\\\\"y"\}.*', '$(mapdata_json_str_3_2)') };
      'mapdata_json_3_3_ok' and => { regcmp('.*\["x\\\\"x","y\\\\"y"\].*', '$(mapdata_json_str_3_3)') };
      'mapdata_json_3_4_ok' and => { regcmp('.*\{"key":"x\\\\"x","key2":"\$\(this.k\[1\]\)","value":"y\\\\"y"\}.*', '$(mapdata_json_str_3_4)') };
      'mapdata_json_4_1_ok' expression => strcmp('$(mapdata_json_str_4_1)', '[]');
      'mapdata_json_4_2_ok' expression => strcmp('$(mapdata_json_str_4_1)', '[]');
      'mapdata_json_4_3_ok' expression => strcmp('$(mapdata_json_str_4_1)', '[]');
      'mapdata_json_4_4_ok' expression => strcmp('$(mapdata_json_str_4_1)', '[]');
      'mapdata_json_5_1_ok' expression => strcmp('$(mapdata_json_str_5_1)', '[]');
      'mapdata_json_5_2_ok' and => { regcmp('.*\{"key":"mykey","value":"myvalue"\}.*', '$(mapdata_json_str_5_2)'),
                                     regcmp('.*\{"key":"anotherkey","value":"anothervalue"\}.*', '$(mapdata_json_str_5_2)'),
                                     regcmp('.*\{"key":"lastkey!","value":"o\\\\"ne"\}.*', '$(mapdata_json_str_5_2)'),
                                     regcmp('.*\{"key":"lastkey!","value":"two"\}.*', '$(mapdata_json_str_5_2)'),
                                     regcmp('.*\{"key":"lastkey!","value":"three"\}.*', '$(mapdata_json_str_5_2)') };
      'mapdata_json_5_3_ok' and => { regcmp('.*\["mykey","myvalue"\].*', '$(mapdata_json_str_5_3)'),
                                     regcmp('.*\["anotherkey","anothervalue"\].*', '$(mapdata_json_str_5_3)'),
                                     regcmp('.*\["lastkey!","o\\\\"ne"\].*', '$(mapdata_json_str_5_3)'),
                                     regcmp('.*\["lastkey!","two"\].*', '$(mapdata_json_str_5_3)'),
                                     regcmp('.*\["lastkey!","three"\].*', '$(mapdata_json_str_5_3)') };
      'mapdata_json_5_4_ok' and => { regcmp('.*\{"key":"mykey","key2":"\$\(this.k\[1\]\)","value":"myvalue"\}.*', '$(mapdata_json_str_5_4)'),
                                     regcmp('.*\{"key":"anotherkey","key2":"\$\(this.k\[1\]\)","value":"anothervalue"\}.*', '$(mapdata_json_str_5_4)'),
                                     regcmp('.*\{"key":"lastkey!","key2":"\$\(this.k\[1\]\)","value":"o\\\\"ne"\}.*', '$(mapdata_json_str_5_4)'),
                                     regcmp('.*\{"key":"lastkey!","key2":"\$\(this.k\[1\]\)","value":"two"\}.*', '$(mapdata_json_str_5_4)'),
                                     regcmp('.*\{"key":"lastkey!","key2":"\$\(this.k\[1\]\)","value":"three"\}.*', '$(mapdata_json_str_5_4)') };
      'mapdata_json_6_1_ok' expression => strcmp('$(mapdata_json_str_6_1)', '[]');
      'mapdata_json_6_2_ok' and => { regcmp('.*\{"key":"a","value":"c"\}.*', '$(mapdata_json_str_6_2)') };
      'mapdata_json_6_3_ok' and => { regcmp('.*\["a","c"\].*', '$(mapdata_json_str_6_3)') };
      'mapdata_json_6_4_ok' and => { regcmp('.*\{"key":"a","key2":"b","value":"c"\}.*', '$(mapdata_json_str_6_4)') };

      "mapdata_none_ok" and => { "mapdata_none_1_1_ok", "mapdata_none_1_2_ok", "mapdata_none_1_3_ok", "mapdata_none_1_4_ok",
                                 "mapdata_none_2_1_ok", "mapdata_none_2_2_ok", "mapdata_none_2_3_ok", "mapdata_none_2_4_ok",
                                 "mapdata_none_3_1_ok", "mapdata_none_3_2_ok", "mapdata_none_3_3_ok", "mapdata_none_3_4_ok",
                                 "mapdata_none_4_1_ok", "mapdata_none_4_2_ok", "mapdata_none_4_3_ok", "mapdata_none_4_4_ok",
                                 "mapdata_none_5_1_ok", "mapdata_none_5_2_ok", "mapdata_none_5_3_ok", "mapdata_none_5_4_ok",
                                 "mapdata_none_6_1_ok", "mapdata_none_6_2_ok", "mapdata_none_6_3_ok", "mapdata_none_6_4_ok" };

      "mapdata_canonify_ok" and => { "mapdata_canonify_1_1_ok", "mapdata_canonify_1_2_ok", "mapdata_canonify_1_3_ok",
                                     "mapdata_canonify_1_4_ok", "mapdata_canonify_2_1_ok", "mapdata_canonify_2_2_ok",
                                     "mapdata_canonify_2_3_ok", "mapdata_canonify_2_4_ok", "mapdata_canonify_3_1_ok",
                                     "mapdata_canonify_3_2_ok", "mapdata_canonify_3_3_ok", "mapdata_canonify_3_4_ok",
                                     "mapdata_canonify_4_1_ok", "mapdata_canonify_4_2_ok", "mapdata_canonify_4_3_ok",
                                     "mapdata_canonify_4_4_ok", "mapdata_canonify_5_1_ok", "mapdata_canonify_5_2_ok",
                                     "mapdata_canonify_5_3_ok", "mapdata_canonify_5_4_ok", "mapdata_canonify_6_1_ok",
                                     "mapdata_canonify_6_2_ok", "mapdata_canonify_6_3_ok", "mapdata_canonify_6_4_ok" };

      "mapdata_canonify_eval_ok" and => { "mapdata_canonify_eval_1_1_ok", "mapdata_canonify_eval_1_2_ok", "mapdata_canonify_eval_1_3_ok",
                                          "mapdata_canonify_eval_1_4_ok", "mapdata_canonify_eval_2_1_ok", "mapdata_canonify_eval_2_2_ok",
                                          "mapdata_canonify_eval_2_3_ok", "mapdata_canonify_eval_2_4_ok", "mapdata_canonify_eval_3_1_ok",
                                          "mapdata_canonify_eval_3_2_ok", "mapdata_canonify_eval_3_3_ok", "mapdata_canonify_eval_3_4_ok",
                                          "mapdata_canonify_eval_4_1_ok", "mapdata_canonify_eval_4_2_ok", "mapdata_canonify_eval_4_3_ok",
                                          "mapdata_canonify_eval_4_4_ok", "mapdata_canonify_eval_5_1_ok", "mapdata_canonify_eval_5_2_ok",
                                          "mapdata_canonify_eval_5_3_ok", "mapdata_canonify_eval_5_4_ok", "mapdata_canonify_eval_6_1_ok",
                                          "mapdata_canonify_eval_6_2_ok", "mapdata_canonify_eval_6_3_ok", "mapdata_canonify_eval_6_4_ok" };

      "mapdata_json_ok" and => { "mapdata_json_1_1_ok", "mapdata_json_1_2_ok", "mapdata_json_1_3_ok", "mapdata_json_1_4_ok",
                                 "mapdata_json_2_1_ok", "mapdata_json_2_2_ok", "mapdata_json_2_3_ok", "mapdata_json_2_4_ok",
                                 "mapdata_json_3_1_ok", "mapdata_json_3_2_ok", "mapdata_json_3_3_ok", "mapdata_json_3_4_ok",
                                 "mapdata_json_4_1_ok", "mapdata_json_4_2_ok", "mapdata_json_4_3_ok", "mapdata_json_4_4_ok",
                                 "mapdata_json_5_1_ok", "mapdata_json_5_2_ok", "mapdata_json_5_3_ok", "mapdata_json_5_4_ok",
                                 "mapdata_json_6_1_ok", "mapdata_json_6_2_ok", "mapdata_json_6_3_ok", "mapdata_json_6_4_ok" };


      "ok" and => { "mapdata_none_ok", "mapdata_canonify_ok", "mapdata_canonify_eval_ok", "mapdata_json_ok" },
        scope => "namespace";
}

#######################################################

bundle agent check
{
  reports:
    DEBUG::
      "mapdata_none*:";
      "mapdata_none_str_$(test.X)_$(test.Y): '$(test.mapdata_none_str_$(test.X)_$(test.Y))'";

    ok::
      "$(this.promise_filename) Pass";

    !ok::
      "$(this.promise_filename) FAIL";
}