Skip to content

Commit

Permalink
Merge pull request #93 from ams-ts-kaitai/valid_fail_eq_str
Browse files Browse the repository at this point in the history
Test to distinguish equality validation of bytes vs. strings.
  • Loading branch information
generalmimon authored Apr 20, 2021
2 parents 2ced587 + 706316f commit 5c1ae09
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
8 changes: 8 additions & 0 deletions formats/valid_fail_eq_str.ksy
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
meta:
id: valid_fail_eq_str
encoding: ASCII
seq:
- id: foo
size: 4
type: str
valid: '"BACK"' # there is actually "PACK" in the file
3 changes: 3 additions & 0 deletions spec/ks/valid_fail_eq_str.kst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id: valid_fail_eq_str
data: fixed_struct.bin
exception: ValidationNotEqualError<str>
8 changes: 5 additions & 3 deletions spec/ruby/valid_fail_eq_bytes_spec.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions spec/ruby/valid_fail_eq_str_spec.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5c1ae09

Please sign in to comment.