summaryrefslogtreecommitdiffstats
path: root/test/data
diff options
context:
space:
mode:
Diffstat (limited to 'test/data')
-rw-r--r--test/data/invalid-messages/bad-header-field-alignment.message34
-rw-r--r--test/data/valid-messages/unknown-header-field.message9
2 files changed, 42 insertions, 1 deletions
diff --git a/test/data/invalid-messages/bad-header-field-alignment.message b/test/data/invalid-messages/bad-header-field-alignment.message
new file mode 100644
index 00000000..75776a37
--- /dev/null
+++ b/test/data/invalid-messages/bad-header-field-alignment.message
@@ -0,0 +1,34 @@
+## last field incorrectly aligned to 4 bytes
+
+## VALID_HEADER includes a LENGTH Header and LENGTH Body
+VALID_HEADER method_call
+
+HEADER_FIELD INTERFACE
+TYPE STRING
+STRING 'org.freedesktop.Foo'
+
+HEADER_FIELD MEMBER
+TYPE STRING
+STRING 'Bar'
+
+HEADER_FIELD UNKNOWN
+TYPE STRING
+STRING 'a'
+
+ALIGN 4
+
+HEADER_FIELD UNKNOWN
+TYPE ARRAY
+TYPE BYTE
+ALIGN 4
+LENGTH ThisByteArray
+START_LENGTH ThisByteArray
+BYTE 1
+BYTE 2
+END_LENGTH ThisByteArray
+
+
+ALIGN 8
+END_LENGTH Header
+START_LENGTH Body
+END_LENGTH Body
diff --git a/test/data/valid-messages/unknown-header-field.message b/test/data/valid-messages/unknown-header-field.message
index 973def68..ac7d624c 100644
--- a/test/data/valid-messages/unknown-header-field.message
+++ b/test/data/valid-messages/unknown-header-field.message
@@ -3,9 +3,16 @@
## VALID_HEADER includes a LENGTH Header and LENGTH Body
VALID_HEADER method_call
REQUIRED_FIELDS
+
HEADER_FIELD UNKNOWN
+TYPE DICT
+LENGTH Dict
+START_LENGTH Dict
+STRING 'int32'
TYPE INT32
-INT32 0xfeeb
+INT32 0x12345678
+END_LENGTH Dict
+
ALIGN 8
END_LENGTH Header
START_LENGTH Body