File tree Expand file tree Collapse file tree 1 file changed +25
-9
lines changed
Expand file tree Collapse file tree 1 file changed +25
-9
lines changed Original file line number Diff line number Diff line change @@ -8,25 +8,41 @@ control += {
88 NAS-Port = 3
99}
1010
11- foreach control.NAS-Port {
11+ foreach thing (control.NAS-Port[*]) {
12+ #
13+ # Test where a "return" in a policy will stop exection
14+ # of the caller.
15+ #
1216 policy_return
1317
1418 # Should continue executing
15- if ("%{Foreach-Variable-0}" == '2' ) {
19+ if (thing == 2 ) {
1620 break
1721 }
1822
19- control -= {
20- NAS-Port == "%{Foreach-Variable-0}"
21- }
23+ thing += 7
2224}
2325
24- # Everything should have been removed except
25- # the last incidence of NAS-Port
26- if (!control.NAS-Port) {
26+ #
27+ # 0, and 1 should have been updated. 2 and 3 are left alone.
28+ #
29+ if (control.NAS-Port[#] != 4) {
2730 test_fail
2831}
29- if (!(control.NAS-Port[0] == 2)) {
32+
33+ if (control.NAS-Port[0] != 7) {
34+ test_fail
35+ }
36+
37+ if (control.NAS-Port[1] != 8) {
38+ test_fail
39+ }
40+
41+ if (control.NAS-Port[2] != 2) {
42+ test_fail
43+ }
44+
45+ if (control.NAS-Port[3] != 3) {
3046 test_fail
3147}
3248
You can’t perform that action at this time.
0 commit comments