summaryrefslogtreecommitdiffstats
path: root/src/tests/keywords/xlat-concat
blob: e0c55a9a8f14264ea2e8c1f3fb5b6d5d0b753587 (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
#
# PRE: xlat-list
#
#  concat xlat
#

update control {
    control !* ANY
}

update control {
	Tmp-IP-Address-0 := 192.0.2.1
	Tmp-IP-Address-0 += 192.0.2.2
}

update request {
	Tmp-String-0 := "%{concat:control:[*] ;}"
}

if (Tmp-String-0 != '192.0.2.1;192.0.2.2') {
	update {
		reply:Filter-Id += 'fail 1'
	}
}

update request {
	Tmp-String-0 := "%{concat:control:[*] X}"
}

if (Tmp-String-0 != '192.0.2.1X192.0.2.2') {
	update {
		reply:Filter-Id += 'fail 2'
	}
}

# Boilerplate junk
update {
	control:Cleartext-Password := 'hello'
	reply:Filter-Id := 'filter'
}