diff --git a/formats/term_u1_val.ksy b/formats/term_u1_val.ksy new file mode 100644 index 000000000..5c4be5c17 --- /dev/null +++ b/formats/term_u1_val.ksy @@ -0,0 +1,13 @@ +# Test if unsigned values in `terminator` work +meta: + id: term_u1_val + endian: le +seq: + - id: foo + terminator: 0xe3 + consume: false + - id: bar + type: str + encoding: UTF-8 + terminator: 0xab + include: true diff --git a/spec/ks/term_u1_val.kst b/spec/ks/term_u1_val.kst new file mode 100644 index 000000000..c701ae0f4 --- /dev/null +++ b/spec/ks/term_u1_val.kst @@ -0,0 +1,11 @@ +id: term_u1_val +data: str_encodings.bin +asserts: + - actual: foo + expected: | + [ + 0x0a, 0x00, 0x53, 0x6f, 0x6d, 0x65, 0x20, 0x41, + 0x53, 0x43, 0x49, 0x49, 0x0f, 0x00 + ] + - actual: bar + expected: '"こんに"'