# Migration support. Some of the tests don't run under the new
# conditions, so we don't run them under the new conditions.
#
-ifeq "$(findstring ${1}, paircmp xlat-string xlat-subst if-failed-xlat if-regex-match-comp if-regex-match-named)" ""
+ifeq "$(findstring ${1}, paircmp xlat-subst if-failed-xlat if-regex-match-comp if-regex-match-named)" ""
$(OUTPUT)/${1}: NEW_COND=-S parse_new_conditions=yes -S use_new_conditions=yes
endif
#
# PRE: update if
#
-# Remove all attributes in a list
-#
-update request {
- &Tmp-Octets-0 := 0x5c5c
- &Tmp-Octets-1 := 0x49206c696b6520636869636b656e2049206c696b65206c69766572
- &Tmp-Octets-2 := 0x490049
- &Tmp-Octets-3 := 0x00
- &Tmp-Octets-4 := 0x7465737431
- &Tmp-Octets-5 := 0x7465737432
-}
-
-update request {
- &Tmp-String-0 := "%{string:%{Tmp-Octets-0}}"
- &Tmp-String-1 := "%{string:%{Tmp-Octets-1}}"
- &Tmp-String-2 := "%{string:%{Tmp-Octets-2}}"
- &Tmp-String-3 := "%{string:%{Tmp-Octets-3}}"
+&request += {
+ &Tmp-Octets-0 = 0x5c5c
+ &Tmp-Octets-1 = 0x49206c696b6520636869636b656e2049206c696b65206c69766572
+ &Tmp-Octets-2 = 0x490049
+ &Tmp-Octets-3 = 0x00
+ &Tmp-Octets-4 = 0x7465737431
+ &Tmp-Octets-5 = 0x7465737432
}
-if (<string>&Tmp-Octets-0 != &Tmp-String-0) {
- test_fail
-}
-
-if (<string>&Tmp-Octets-1 != &Tmp-String-1) {
- test_fail
+&request += {
+ &Tmp-String-0 = "%{string:%{Tmp-Octets-0}}"
+ &Tmp-String-1 = "%{string:%{Tmp-Octets-1}}"
+ &Tmp-String-2 = "%{string:%{Tmp-Octets-2}}"
+ &Tmp-String-3 = "%{string:%{Tmp-Octets-3}}"
}
-if (<string>&Tmp-Octets-2 != &Tmp-String-2) {
+#
+# Cast of octets to string is the octets *printed* to a string, just
+# like every other data type. If we want to *convert* the octets to
+# a string, we have to use "%{string:...}"
+#
+if (<string>&Tmp-Octets-0 != "0x5c5c") {
test_fail
}
-if (<string>&Tmp-Octets-3 != &Tmp-String-3) {
+#
+# And the printed "0x5c5c" is not equivalent to the octet string
+#
+if (<string>&Tmp-Octets-0 == 0x5c5c) {
test_fail
}
test_fail
}
-if (<string>&Tmp-Octets-0 != "%{string:%{Tmp-Octets-0}}") {
+#
+# These are now defined to be different.
+#
+if (<string>&Tmp-Octets-0 == "%{string:%{Tmp-Octets-0}}") {
test_fail
}