Skip to content

Commit

Permalink
Add test TermU1Val demonstrating kaitai-io/kaitai_struct_java_runtime#35
Browse files Browse the repository at this point in the history
  • Loading branch information
generalmimon committed Mar 27, 2021
1 parent d66edc7 commit a7bda32
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
13 changes: 13 additions & 0 deletions formats/term_u1_val.ksy
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions spec/ks/term_u1_val.kst
Original file line number Diff line number Diff line change
@@ -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: '"こんに"'

0 comments on commit a7bda32

Please sign in to comment.