From e3a4d07d3ba8b6912714f0af66ef229d70b53af4 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 16 Feb 2003 23:03:21 +0000 Subject: [PATCH] test cases with wrong header padding --- .../invalid-messages/too-little-header-padding.message | 13 +++++++++++++ .../too-much-header-padding-by-far.message | 15 +++++++++++++++ .../data/invalid-messages/too-much-header-padding.message | 12 ++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 test/data/invalid-messages/too-little-header-padding.message create mode 100644 test/data/invalid-messages/too-much-header-padding-by-far.message create mode 100644 test/data/invalid-messages/too-much-header-padding.message diff --git a/test/data/invalid-messages/too-little-header-padding.message b/test/data/invalid-messages/too-little-header-padding.message new file mode 100644 index 0000000..cf73be6 --- /dev/null +++ b/test/data/invalid-messages/too-little-header-padding.message @@ -0,0 +1,13 @@ +## has one byte missing from header padding + +## VALID_HEADER includes a LENGTH Header and LENGTH Body +VALID_HEADER +FIELD_NAME unkn +TYPE STRING +STRING 'a' +ALIGN 8 +## kill a padding byte +CHOP 1 +END_LENGTH Header +START_LENGTH Body +END_LENGTH Body diff --git a/test/data/invalid-messages/too-much-header-padding-by-far.message b/test/data/invalid-messages/too-much-header-padding-by-far.message new file mode 100644 index 0000000..a60aca8 --- /dev/null +++ b/test/data/invalid-messages/too-much-header-padding-by-far.message @@ -0,0 +1,15 @@ +## has one byte extra header padding + +## VALID_HEADER includes a LENGTH Header and LENGTH Body +VALID_HEADER +FIELD_NAME unkn +TYPE STRING +STRING 'a' +ALIGN 8 +BYTE 0 +ALIGN 8 +BYTE 0 +ALIGN 8 +END_LENGTH Header +START_LENGTH Body +END_LENGTH Body diff --git a/test/data/invalid-messages/too-much-header-padding.message b/test/data/invalid-messages/too-much-header-padding.message new file mode 100644 index 0000000..ebf154e --- /dev/null +++ b/test/data/invalid-messages/too-much-header-padding.message @@ -0,0 +1,12 @@ +## has one byte extra header padding + +## VALID_HEADER includes a LENGTH Header and LENGTH Body +VALID_HEADER +FIELD_NAME unkn +TYPE STRING +STRING 'a' +ALIGN 8 +BYTE 0 +END_LENGTH Header +START_LENGTH Body +END_LENGTH Body -- 2.7.4