control := {
	Framed-IP-Address = 192.0.2.1
	Framed-IP-Address = 192.0.2.2
}

if !(%{control.[#]} == 2) {
	test_fail
}

if !(%{control.[0]} == 192.0.2.1) {
	test_fail
}

if !(%{control.[1]} == 192.0.2.2) {
	test_fail
}

if !(%{control.[n]} == 192.0.2.2) {
	test_fail
}

#
#  Cast this to a string!
#
if !("%{control.[*]}" == '192.0.2.1192.0.2.2') {
	test_fail
}

# Try calling these xlats in mapping too, they may get optimised to VPTs which is a
# different code path.
request += {
	NAS-IP-Address = %{control.[1]}
	NAS-IP-Address = %{control.[0]}
	Filter-Id	= %concat(%{control.[*]}, ',')
	NAS-Port = %{control.[#]}
}

if !(Filter-Id == '192.0.2.1,192.0.2.2') {
	test_fail
}

if !(NAS-Port == 2) {
	test_fail
}

accept
success
