#
#  Tests for casts
#
#  $Id: d39d8119313861e3ee097cffb3721184e055216b $
#

proto-dictionary radius
tmpl-rules allow_unresolved=yes allow_unknown=yes

# Forcefully cast RHS bareword
condition &User-Name == (ipaddr)192.168.0.1
match (&User-Name == 192.168.0.1)

# Forcefully cast LHS bareword
condition (ipaddr)192.168.0.1 == &User-Name
match (192.168.0.1 == &User-Name)

# Forcefully cast RHS single quotes
# we can cast the data during parsing, so we do that.
condition &Framed-IP-Address == (ipaddr)'192.168.0.1'
match (&Framed-IP-Address == 192.168.0.1)

# Forcefully cast LHS single quotes
condition (ipaddr)'192.168.0.1' == &Framed-IP-Address
match  (192.168.0.1 == &Framed-IP-Address)

# Forcefully cast RHS double quotes
condition &User-Name == (ipaddr)"192.168.0.1"
match (&User-Name == 192.168.0.1)

# Forcefully cast LHS single quotes
condition (ipaddr)"192.168.0.1" == &User-Name
match (192.168.0.1 == &User-Name)

count
match 14
