Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for regex support in the valid key #86

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions formats/valid_fail_regex.ksy
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
meta:
id: valid_fail_regex
seq:
- id: foo1
type: str
encoding: ASCII
size: 6
valid:
regex: P[a-z]{2}K-\d
#expecting lower case, where there are upper case letters in the file
17 changes: 17 additions & 0 deletions formats/valid_regex.ksy
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
meta:
id: valid_regex
seq:
- id: foo1
type: str
encoding: ASCII
size: 6
valid:
regex: P[A-Z]{2}K-\d
- id: pad1
size: 2
- id: foo2
type: str
encoding: ASCII
size: 10
valid:
regex: "[A-Z]{4}p*-+U-+DEF"
20 changes: 20 additions & 0 deletions spec/cpp_stl_11/test_valid_fail_regex.cpp

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

16 changes: 16 additions & 0 deletions spec/cpp_stl_11/test_valid_regex.cpp

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

20 changes: 20 additions & 0 deletions spec/cpp_stl_98/test_valid_fail_regex.cpp

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

31 changes: 31 additions & 0 deletions spec/go/valid_regex_test.go

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

15 changes: 15 additions & 0 deletions spec/java/src/io/kaitai/struct/spec/TestValidFailRegex.java

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

15 changes: 15 additions & 0 deletions spec/java/src/io/kaitai/struct/spec/TestValidRegex.java

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

8 changes: 8 additions & 0 deletions spec/javascript/test_valid_regex.js

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

3 changes: 3 additions & 0 deletions spec/ks/valid_fail_regex.kst

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

2 changes: 2 additions & 0 deletions spec/ks/valid_regex.kst

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

12 changes: 12 additions & 0 deletions spec/python/test_valid_fail_regex.py

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

11 changes: 11 additions & 0 deletions spec/python/test_valid_regex.py

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