From e6f8b6997aea8c17f38f295f11538502ec2c693d Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Tue, 11 Jun 2024 18:34:02 -0500 Subject: [PATCH] Update: f_iki unit test to include changes from 0.6. The 0.6 branch has added support for grave. The unit tests were then updated. This forward ports those unit test changes. --- level_0/f_iki/tests/unit/c/test-iki-read.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/level_0/f_iki/tests/unit/c/test-iki-read.c b/level_0/f_iki/tests/unit/c/test-iki-read.c index d1f7f39..393d497 100644 --- a/level_0/f_iki/tests/unit/c/test-iki-read.c +++ b/level_0/f_iki/tests/unit/c/test-iki-read.c @@ -112,6 +112,8 @@ void test__f_iki_read__works(void **state) { macro_f_string_static_t_initialize_1("IKI Content:\"May have spaces\\\" and' quotes.\"", 0, 44), macro_f_string_static_t_initialize_1("url:'https://localhost/fake-0.7.0.tar.gz?query=xx¶meter=yyy%20' end.", 0, 72), macro_f_string_static_t_initialize_1("url:\"https://localhost/fake-0.7.0.tar.gz?query=xx¶meter=yyy%20\" end.", 0, 72), + macro_f_string_static_t_initialize_1("url:`https://localhost/fake-0.7.0.tar.gz?query=xx¶meter=yyy%20` end.", 0, 72), + macro_f_string_static_t_initialize_1("iki:'\"`' iki:'`\"'", 0, 17), }; const f_number_unsigned_t matches[] = { @@ -137,6 +139,8 @@ void test__f_iki_read__works(void **state) { 1, 1, 1, + 1, + 2, }; const f_status_t statuss[] = { @@ -162,9 +166,11 @@ void test__f_iki_read__works(void **state) { F_okay_stop, F_okay, F_okay, + F_okay, + F_okay, }; - const f_range_t variables[][22] = { + const f_range_t variables[][24] = { { f_range_t_initialize, f_range_t_initialize }, { f_range_t_initialize, f_range_t_initialize }, { macro_f_range_t_initialize_1(0, 8), f_range_t_initialize }, @@ -187,9 +193,11 @@ void test__f_iki_read__works(void **state) { { macro_f_range_t_initialize_1(4, 43), f_range_t_initialize }, { macro_f_range_t_initialize_1(0, 66), f_range_t_initialize }, { macro_f_range_t_initialize_1(0, 66), f_range_t_initialize }, + { macro_f_range_t_initialize_1(0, 66), f_range_t_initialize }, + { macro_f_range_t_initialize_1(0, 7), macro_f_range_t_initialize_1(9, 16) }, }; - const f_range_t vocabularys[][22] = { + const f_range_t vocabularys[][24] = { { f_range_t_initialize, f_range_t_initialize }, { f_range_t_initialize, f_range_t_initialize }, { macro_f_range_t_initialize_1(0, 2), f_range_t_initialize }, @@ -212,9 +220,11 @@ void test__f_iki_read__works(void **state) { { macro_f_range_t_initialize_1(4, 10), f_range_t_initialize }, { macro_f_range_t_initialize_1(0, 2), f_range_t_initialize }, { macro_f_range_t_initialize_1(0, 2), f_range_t_initialize }, + { macro_f_range_t_initialize_1(0, 2), f_range_t_initialize }, + { macro_f_range_t_initialize_1(0, 2), macro_f_range_t_initialize_1(9, 11) }, }; - const f_range_t contents[][22] = { + const f_range_t contents[][24] = { { f_range_t_initialize, f_range_t_initialize }, { f_range_t_initialize, f_range_t_initialize }, { macro_f_range_t_initialize_1(5, 7), f_range_t_initialize }, @@ -237,9 +247,11 @@ void test__f_iki_read__works(void **state) { { macro_f_range_t_initialize_1(13, 42), f_range_t_initialize }, { macro_f_range_t_initialize_1(5, 65), f_range_t_initialize }, { macro_f_range_t_initialize_1(5, 65), f_range_t_initialize }, + { macro_f_range_t_initialize_1(5, 65), f_range_t_initialize }, + { macro_f_range_t_initialize_1(5, 6), macro_f_range_t_initialize_1(14, 15) }, }; - for (uint8_t i = 0; i < 22; ++i) { + for (uint8_t i = 0; i < 24; ++i) { f_range_t range = macro_f_range_t_initialize_2(buffers[i].used); f_iki_data_t iki = f_iki_data_t_initialize; -- 1.8.3.1