summaryrefslogtreecommitdiffstats
path: root/src/tests/keywords/if-regex-multivalue
blob: 7358c9336db43b00a9cd9ec63783a64579ccd9b9 (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
#
# PRE: update if
#
update {
       control:Cleartext-Password := 'hello'
       reply:Filter-Id := 'filter'
}

update request {
	Cisco-AVPair := 'foo=bar'
	Cisco-AVPair += 'bar=baz'
	Cisco-AVPair += 'baz=foo'
}

if (&Cisco-AVPair[*] =~ /bar=(.*)/) {
	if ("%{1}" != 'baz') {
		update reply {
			Filter-Id += 'Fail 1'
		}
	}
}
else {
	update reply {
		Filter-Id += 'Fail 2'
	}
}