summaryrefslogtreecommitdiffstats
path: root/src/tests/keywords/switch-attr-cmp
blob: e28ded8107868f324334d37fc0a9fb493d1294f9 (plain)
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
#
#  PRE: switch
#
update request {
	Tmp-String-0 := &User-Name
}

#
#  A switch statement where we compare two attributes
#
switch &User-Name {
	case &Tmp-String-0 {
		update reply {
			Filter-Id := "filter"
		}
	}

	case "bob" {
		update reply {
			Filter-Id := "failed 0"
		}
	}

	case "doug" {
		update reply {
			Filter-Id := "failed 1"
		}
	}

	case {
		update reply {
			Filter-Id := "failed 2"
		}
	}

}