diff options
author | JSDurand <mmemmew@gmail.com> | 2023-07-21 16:21:00 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-07-21 16:21:00 +0800 |
commit | 201830e33ab5c45044e960217e0ac8803e3e134d (patch) | |
tree | b5e2f6275cf3245cc155cfabaac91beab56df75a /src/test.c | |
parent | 659c2195d2c224122cc8da813bec3af46084b61b (diff) |
Add variations to the test
Add an intentionally ambiguous grammar for testing purposes.
It seems to work fine.
Diffstat (limited to 'src/test.c')
-rw-r--r-- | src/test.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -23,6 +23,8 @@ main(int argc, char **argv) "\n" "item = header [ price ] *1( note )\n" "\n" +"item =/ header [ note ] *1( price )\n" +"\n" "header = *1star \"SP\" title %xA *( \"SP\" / %xA )\n" "\n" "title = 1*\"TEXT\"\n" @@ -66,13 +68,13 @@ main(int argc, char **argv) return EXIT_FAILURE; } - int input_unenc[10] = { 3, 0, 2, 2, 2, 1, 1, 1, 0, 1 }; + int input_unenc[10] = { 3, 0, 2, 2, 2, 1, 5, 0, 6, 1 }; for (int i = 0; i < 10; i++) to_big_endian(input_unenc[i], input + (8 * i)); unsigned char input_len[8] = { 0 }; - input_len[7] = 8*6; + input_len[7] = 8*10; struct UnsignedVec input_vec = (struct UnsignedVec) { input_len, NULL, input }; |