You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.5 KiB
48 lines
1.5 KiB
---
|
|
test case: Compressed data
|
|
in:
|
|
fragments: &fragments
|
|
- 'ZBXD\x03\x12\x00\x00\x00\x0A\x00\x00\x00\x78\x9C\x4B\x4C\x4F\xCD\x2B\xD1\x2B\xC8\xCC\x4B\x07\x00\x15\x79\x03\xEC'
|
|
out:
|
|
fragments:
|
|
- 'ZBXD\x03\x12\x00\x00\x00\x0A\x00\x00\x00agent.ping'
|
|
return: SUCCEED
|
|
bytes: 23
|
|
---
|
|
test case: Corrupted compressed data
|
|
in:
|
|
fragments: &fragments
|
|
- 'ZBXD\x03\x12\x00\x00\x00\x0A\x00\x00\x00\x00\x9C\x4B\x4C\x4F\xCD\x2B\xD1\x2B\xC8\xCC\x4B\x07\x00\x15\x79\x03\xEC'
|
|
out:
|
|
fragments:
|
|
- 'ZBXD\x03\x12\x00\x00\x00\x0A\x00\x00\x00agent.ping'
|
|
return: FAIL
|
|
---
|
|
test case: Compressed data with uncompressed size greater than expected
|
|
in:
|
|
fragments: &fragments
|
|
- 'ZBXD\x03\x12\x00\x00\x00\x05\x00\x00\x00\x78\x9C\x4B\x4C\x4F\xCD\x2B\xD1\x2B\xC8\xCC\x4B\x07\x00\x15\x79\x03\xEC'
|
|
out:
|
|
fragments:
|
|
- 'ZBXD\x03\x12\x00\x00\x00\x0A\x00\x00\x00agent.ping'
|
|
return: FAIL
|
|
---
|
|
test case: Compressed data with uncompressed size less than expected
|
|
in:
|
|
fragments: &fragments
|
|
- 'ZBXD\x03\x12\x00\x00\x00\x35\x00\x00\x00\x78\x9C\x4B\x4C\x4F\xCD\x2B\xD1\x2B\xC8\xCC\x4B\x07\x00\x15\x79\x03\xEC'
|
|
out:
|
|
fragments:
|
|
- 'ZBXD\x03\x12\x00\x00\x00\x0A\x00\x00\x00agent.ping'
|
|
return: FAIL
|
|
---
|
|
test case: Compressed data with large length fields
|
|
in:
|
|
fragments: &fragments
|
|
- 'ZBXD\x07\x12\x00\x00\x00\x00\x00\x00\x00\x0A\x00\x00\x00\x00\x00\x00\x00\x78\x9C\x4B\x4C\x4F\xCD\x2B\xD1\x2B\xC8\xCC\x4B\x07\x00\x15\x79\x03\xEC'
|
|
out:
|
|
fragments:
|
|
- 'ZBXD\x07\x12\x00\x00\x00\x00\x00\x00\x00\x0A\x00\x00\x00\x00\x00\x00\x00agent.ping'
|
|
return: SUCCEED
|
|
bytes: 31
|