1+ body common control
2+ {
3+ inputs => { "../../../default.cf.sub"};
4+ bundlesequence => { default("$(this.promise_filename)") };
5+ version => "1.0";
6+ }
7+
8+ bundle agent init
9+ {
10+ vars:
11+ "foo_list"
12+ slist => { "1", "2", "3" };
13+ }
14+
15+ body file control
16+ {
17+ namespace => "new_namespace";
18+ }
19+
20+ bundle agent check
21+ {
22+ vars:
23+ "bar_list"
24+ slist => { "1", "2", "3" };
25+
26+ "unquoted_foo_list1"
27+ string => join(", ", foo_list);
28+
29+ "unquoted_foo_list2"
30+ string => join(", ", init.foo_list);
31+
32+ "unquoted_foo_list3"
33+ string => join(", ", default:foo_list);
34+
35+ "unquoted_foo_list4"
36+ string => join(", ", default:init.foo_list);
37+
38+ "unquoted_bar_list1"
39+ string => join(", ", bar_list);
40+
41+ "unquoted_bar_list2"
42+ string => join(", ", check.bar_list);
43+
44+ "unquoted_bar_list3"
45+ string => join(", ", new_namespace:bar_list);
46+
47+ "unquoted_bar_list4"
48+ string => join(", ", new_namespace:check.bar_list);
49+
50+ "quoted_foo_list1"
51+ string => join(", ", foo_list);
52+
53+ "quoted_foo_list2"
54+ string => join(", ", init.foo_list);
55+
56+ "quoted_foo_list3"
57+ string => join(", ", default:foo_list);
58+
59+ "quoted_foo_list4"
60+ string => join(", ", default:init.foo_list);
61+
62+ "quoted_bar_list1"
63+ string => join(", ", bar_list);
64+
65+ "quoted_bar_list2"
66+ string => join(", ", check.bar_list);
67+
68+ "quoted_bar_list3"
69+ string => join(", ", new_namespace:bar_list);
70+
71+ "quoted_bar_list4"
72+ string => join(", ", new_namespace:check.bar_list);
73+
74+ classes:
75+ "undefined_vars"
76+ expression => not(or(isvariable("unquoted_foo_list1"),
77+ isvariable("unquoted_foo_list3"),
78+ isvariable("unquoted_bar_list2"),
79+ isvariable("quoted_foo_list1"),
80+ isvariable("quoted_foo_list3"),
81+ isvariable("quoted_bar_list2")));
82+
83+ "defined_vars"
84+ expression => and(strcmp("1, 2, 3", "$(unquoted_foo_list2)"),
85+ strcmp("1, 2, 3", "$(unquoted_foo_list4)"),
86+ strcmp("1, 2, 3", "$(unquoted_bar_list1)"),
87+ strcmp("1, 2, 3", "$(unquoted_bar_list3)"),
88+ strcmp("1, 2, 3", "$(unquoted_bar_list4)"),
89+ strcmp("1, 2, 3", "$(quoted_foo_list2)"),
90+ strcmp("1, 2, 3", "$(quoted_foo_list4)"),
91+ strcmp("1, 2, 3", "$(quoted_bar_list1)"),
92+ strcmp("1, 2, 3", "$(quoted_bar_list3)"),
93+ strcmp("1, 2, 3", "$(quoted_bar_list4)"));
94+
95+ reports:
96+ defined_vars.undefined_vars::
97+ "$(this.promise_filename) Pass";
98+ !defined_vars|!undefined_vars::
99+ "$(this.promise_filename) FAIL";
100+ }
0 commit comments