#
# PRE: update
#
update {
	Filter-Id := 'foobarbaz'
	NAS-Port := 123456789
	Framed-IP-Address := 192.0.2.1
	Framed-IP-Address += 192.0.2.2
	control.Framed-IP-Address := 192.0.2.1
	control.Framed-IP-Address += 192.0.2.3
	control.Login-IP-Host := 192.0.3.1
}

if (!((Framed-IP-Address[0] == 192.0.2.1)) || (!(Framed-IP-Address[1] == 192.0.2.2))) {
	test_fail
}

# Remove all attributes in the request list
update {
	Framed-IP-Address !* ANY
}

# Non Framed-IP-Address address attributes should still be in the request list
if (!((Filter-Id == 'foobarbaz')) || (!(NAS-Port == 123456789))) {
	test_fail
}

# There should be no Framed-IP-Address attributes in the request list
if (Framed-IP-Address) {
	test_fail
}

# But there should still be some in the control list
if (!((control.Framed-IP-Address == 192.0.2.1)) || (!(control.Framed-IP-Address[1] == 192.0.2.3))) {
	test_fail
}

update {
	control.Framed-IP-Address !* ANY
	control.Login-IP-Host !* ANY
}

if (control.Framed-IP-Address || control.Login-IP-Host) {
	test_fail
}

success
