]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
tests for nested types
authorAlan T. DeKok <aland@freeradius.org>
Thu, 7 Sep 2023 17:20:17 +0000 (13:20 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 7 Sep 2023 17:20:17 +0000 (13:20 -0400)
src/tests/unit/protocols/radius/time_delta.txt
src/tests/unit/protocols/radius/unit.txt

index dcf3a843dbc10f774ca4d5bc3fe5d702781a411c..0186414cbd1f5dbdb8ee67eb2c6d7f12ab315234 100644 (file)
@@ -5,11 +5,13 @@ proto radius
 proto-dictionary radius
 fuzzer-out radius
 
+migrate pair_legacy_nested = true
+
 #
 #  Time delta in milliseconds.
 #
 pair Unit-TLV.Delta-MSec = 5
-match Unit-TLV.Delta-MSec = 5
+match Unit-TLV = { Delta-MSec = 5 }
 
 encode-pair -
 match fe 08 02 06 00 00 00 05
@@ -18,7 +20,7 @@ decode-pair -
 match Unit-TLV = { Delta-MSec = 5 }
 
 pair Unit-TLV.Delta-Sec = 10
-match Unit-TLV.Delta-Sec = 10
+match Unit-TLV = { Delta-Sec = 10 }
 
 encode-pair -
 match fe 08 03 06 00 00 00 0a
@@ -53,7 +55,7 @@ decode-pair -
 match Unit-TLV = { Delta-MSec-int32 = -32768 }
 
 pair Unit-TLV.Delta-MSec-int32 = -32768
-match Unit-TLV.Delta-MSec-int32 = -32768
+match Unit-TLV = { Delta-MSec-int32 = -32768 }
 
 encode-pair Unit-TLV.Delta-MSec-int16 = -32768
 match fe 06 06 04 80 00
@@ -62,7 +64,7 @@ decode-pair -
 match Unit-TLV = { Delta-MSec-int16 = -32768 }
 
 pair Unit-TLV.Delta-MSec-int16 = -32768
-match Unit-TLV.Delta-MSec-int16 = -32768
+match Unit-TLV = { Delta-MSec-int16 = -32768 }
 
 # Regression test for broken signed promotion
 encode-pair Unit-TLV.Delta-MSec-int32 = -32768
@@ -72,7 +74,7 @@ decode-pair -
 match Unit-TLV = { Delta-MSec-int32 = -32768 }
 
 pair Unit-TLV.Delta-MSec-int32 = -32768
-match Unit-TLV.Delta-MSec-int32 = -32768
+match Unit-TLV = { Delta-MSec-int32 = -32768 }
 
 #
 #      Min/Max values & overflows
@@ -80,10 +82,10 @@ match Unit-TLV.Delta-MSec-int32 = -32768
 
 # Internal format is int64_t
 pair Unit-TLV.Delta-MSec-uint16 = 9223372036853
-match Unit-TLV.Delta-MSec-uint16 = 9223372036853
+match Unit-TLV = { Delta-MSec-uint16 = 9223372036853 }
 
 pair Unit-TLV.Delta-MSec-uint32 = 9223372036853
-match Unit-TLV.Delta-MSec-uint32 = 9223372036853
+match Unit-TLV = { Delta-MSec-uint32 = 9223372036853 }
 
 # therefore, the encode should limit to the data type.
 encode-pair Unit-TLV.Delta-MSec-uint16 = 9223372036853
@@ -119,4 +121,4 @@ decode-pair -
 match Unit-TLV = { Delta-MSec-int32 = 2147483647 }
 
 count
-match 65
+match 66
index 2fd92daaed8ffb9622fa8ca91e52762b1fe24b01..ebdf25328279ebee2288a75f74c273dc1dfb45dd 100644 (file)
@@ -3,6 +3,8 @@ proto radius
 proto-dictionary radius
 fuzzer-out radius
 
+migrate pair_legacy_nested = true
+
 #
 #  And using the dictionaries
 #
@@ -10,7 +12,7 @@ encode-pair Extended-Attribute-6.Extended-Vendor-Specific-6.FreeRADIUS.Unit-EVS-
 match f6 0d 1a 00 00 00 2c 50 01 00 00 00 01 f6 0d 1a 00 00 00 2c 50 01 00 00 00 02
 
 pair Extended-Attribute-1.Unit-Ext-241-Integer = 6809
-match Extended-Attribute-1.Unit-Ext-241-Integer = 6809
+match Extended-Attribute-1 = { Unit-Ext-241-Integer = 6809 }
 
 encode-pair Extended-Attribute-1.Unit-Ext-241-Integer = 6809
 match f1 07 f1 00 00 1a 99
@@ -75,7 +77,7 @@ match 37 06 00 0d 2f 00
 
 # Can we parse RFC 3339 dates correctly?
 pair Unit-TLV.Milliseconds = "2019-08-21T07:40:31.123-04:00"
-match Unit-TLV.Milliseconds = "2019-08-21T03:40:31.123Z"
+match Unit-TLV = { Milliseconds = "2019-08-21T03:40:31.123Z" }
 
 count
-match 35
+match 36