summaryrefslogtreecommitdiffstats
path: root/src/tests/keywords/switch-escape
blob: 50d9fdf7b49e41424cc635696a887f42abe09a67 (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
37
38
39
40
41
42
43
update request {
	&Tmp-String-0 := 'foo'
}

switch "%{tolower:%{request:Tmp-String-0}}" {
	case 'foo' {
		update reply {
			Filter-Id := "filter"
		}
	}

	case '' {
		update reply {
			Filter-Id += "fail-empty-1"
		}
	}

	case {
		update reply {
			Filter-Id += "fail-default-1"
		}
	}
}

switch "%{request:Tmp-String-0}" {
	case 'foo' {
		update reply {
			Filter-Id := "filter"
		}
	}

	case '' {
		update reply {
			Filter-Id += "fail-empty-2"
		}
	}

	case {
		update reply {
			Filter-Id += "fail-default-2"
		}
	}
}