From: Kevin Day Date: Thu, 21 Nov 2024 05:24:17 +0000 (-0600) Subject: Update: Fix IKI write and add EKI write functions for f_iki. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=9504063a779e16676ee7a86e1e2c2efd8bfa32fa;p=fll Update: Fix IKI write and add EKI write functions for f_iki. Fix the backslash handling now that I have figured that whole situation out and updated the specifications. Adding support for the EKI write. Add more extensive unit tests for both IKI write and EKI write. I am trying to keep both the IKI write and the IKI write works functions as similar as possible. The "works" write tests are already big enough anyway. Implement a separate test for EKI, called `test__f_iki_eki_write__works_for_multiple`, to handle the multiple vocabularies case. This will be structurally identical to the regular works tests but instead has multiple vocabularies. --- diff --git a/level_0/f_iki/c/iki.c b/level_0/f_iki/c/iki.c index 6d1fe65..f3ae31e 100644 --- a/level_0/f_iki/c/iki.c +++ b/level_0/f_iki/c/iki.c @@ -638,6 +638,176 @@ extern "C" { } #endif // _di_f_iki_eki_read_ +#ifndef _di_f_iki_eki_write_ + void f_iki_eki_write(const f_string_statics_t vocabularys, const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t * const destination, f_state_t * const state) { + #ifndef _di_level_1_parameter_checking_ + if (!state) return; + + if (!destination || !quote.used || (quote.string[0] != f_iki_syntax_quote_double_s.string[0] && quote.string[0] != f_iki_syntax_quote_grave_s.string[0] && quote.string[0] != f_iki_syntax_quote_single_s.string[0])) { + state->status = F_status_set_error(F_parameter); + + return; + } + #endif // _di_level_1_parameter_checking_ + + if (!vocabularys.used) { + state->status = F_status_set_error(F_data_not); + + return; + } + + f_range_t range = f_range_t_initialize; + f_number_unsigned_t i = 0; + f_number_unsigned_t j = 0; + f_number_unsigned_t total = 0; + f_number_unsigned_t count = 0; + + for (; i < vocabularys.used; ++i) { + + if (!vocabularys.array[i].used) continue; + + range.start = 0; + range.stop = vocabularys.array[i].used - 1; + ++count; + + do { + if (state->interrupt) { + state->interrupt((void * const) state, 0); + if (F_status_set_fine(state->status) == F_interrupt) break; + } + + j = vocabularys.array[i].used - range.start; + + state->status = f_utf_is_word_dash_plus(vocabularys.array[i].string + range.start, j, F_false); + if (F_status_is_error(state->status)) break; + + if (state->status == F_false) { + state->status = F_status_set_error(F_syntax); + + break; + } + + total += vocabularys.array[i].used; + + state->status = f_utf_buffer_increment(vocabularys.array[i], &range, 1); + + } while (F_status_is_error_not(state->status) && range.start < range.stop); + } // for + + if (F_status_is_error(state->status)) return; + + if (!total) { + state->status = F_status_set_error(F_data_not); + + return; + } + + // Pre-allocate the expected size along with two extra slots for slashes to help reduce potential allocations. + if (F_status_is_error_not(state->status)) { + state->status = f_memory_array_increase_by(total + ((count - 1) * f_iki_syntax_separator_s.used) + content.used + f_iki_syntax_wrap_close_s.used + f_iki_syntax_wrap_open_s.used + f_iki_syntax_separator_s.used + (f_iki_syntax_slash_s.used * 2) + (quote.used * 2), sizeof(f_char_t), (void **) &destination->string, &destination->used, &destination->size); + } + + if (F_status_is_error_not(state->status) && (state->flag & f_iki_state_flag_force_wrap_e)) { + state->status = f_string_dynamic_append(f_iki_syntax_wrap_open_s, destination); + } + + total = count; + count = 0; + + for (i = 0; F_status_is_error_not(state->status) && i < vocabularys.used; ++i) { + + if (!vocabularys.array[i].used) continue; + + state->status = f_string_dynamic_append(vocabularys.array[i], destination); + + if (F_status_is_error_not(state->status) && ++count < total) { + state->status = f_string_dynamic_append(f_iki_syntax_separator_s, destination); + } + } // for + + if (F_status_is_error_not(state->status) && (state->flag & f_iki_state_flag_force_wrap_e)) { + state->status = f_string_dynamic_append(f_iki_syntax_wrap_close_s, destination); + } + + if (F_status_is_error_not(state->status)) { + state->status = f_string_dynamic_append(f_iki_syntax_separator_s, destination); + } + + if (F_status_is_error_not(state->status)) { + state->status = f_string_dynamic_append(quote, destination); + } + + if (F_status_is_error_not(state->status)) { + total = 0; + j = 0; + range.start = 0; + range.stop = content.used - 1; + + for (i = 0; i < content.used; ++i) { + + if (!content.string[i]) continue; + + if (content.string[i] == quote.string[0]) { + state->status = f_memory_array_increase_by((i - range.start) + 1 + (total * f_iki_syntax_slash_s.used) + f_iki_syntax_slash_s.used + quote.used, sizeof(f_char_t), (void **) &destination->string, &destination->used, &destination->size); + + if (F_status_is_error_not(state->status) && i) { + range.stop = i - 1; + + state->status = f_string_dynamic_partial_append(content, range, destination); + } + + if (total) { + for (j = 0; F_status_is_error_not(state->status) && j < total; ++j) { + state->status = f_string_dynamic_append(f_iki_syntax_slash_s, destination); + } // for + } + + if (F_status_is_error_not(state->status)) { + state->status = f_string_dynamic_append(f_iki_syntax_slash_s, destination); + } + + if (F_status_is_error_not(state->status)) { + state->status = f_string_dynamic_append(quote, destination); + } + + if (F_status_is_error(state->status)) break; + + range.start = i + 1; + range.stop = content.used - 1; + total = 0; + } + else if (content.string[i] == f_iki_syntax_slash_s.string[0]) { + ++total; + } + else if (total) { + total = 0; + } + } // for + + if (F_status_is_error_not(state->status) && range.start <= range.stop) { + state->status = f_string_dynamic_partial_append(content, range, destination); + } + + // Slashes at the end must be escaped. + if (F_status_is_error_not(state->status) && total) { + state->status = f_memory_array_increase_by(total, sizeof(f_char_t), (void **) &destination->string, &destination->used, &destination->size); + + for (j = 0; F_status_is_error_not(state->status) && j < total; ++j) { + state->status = f_string_dynamic_append(f_iki_syntax_slash_s, destination); + } // for + } + } + + if (F_status_is_error_not(state->status)) { + state->status = f_string_dynamic_append(quote, destination); + } + + if (F_status_is_error_not(state->status)) { + state->status = F_okay; + } + } +#endif // _di_f_iki_eki_write_ + #ifndef _di_f_iki_object_is_ f_status_t f_iki_object_is(const f_string_static_t object) { @@ -1155,18 +1325,31 @@ extern "C" { } if (F_status_is_error_not(state->status)) { + f_number_unsigned_t total = 0; + f_number_unsigned_t j = 0; + range.start = 0; range.stop = content.used - 1; for (i = 0; i < content.used; ++i) { + if (!content.string[i]) continue; + if (content.string[i] == quote.string[0]) { - if (i) { + state->status = f_memory_array_increase_by((i - range.start) + 1 + (total * f_iki_syntax_slash_s.used) + f_iki_syntax_slash_s.used + quote.used, sizeof(f_char_t), (void **) &destination->string, &destination->used, &destination->size); + + if (F_status_is_error_not(state->status) && i) { range.stop = i - 1; state->status = f_string_dynamic_partial_append(content, range, destination); } + if (total) { + for (j = 0; F_status_is_error_not(state->status) && j < total; ++j) { + state->status = f_string_dynamic_append(f_iki_syntax_slash_s, destination); + } // for + } + if (F_status_is_error_not(state->status)) { state->status = f_string_dynamic_append(f_iki_syntax_slash_s, destination); } @@ -1179,12 +1362,28 @@ extern "C" { range.start = i + 1; range.stop = content.used - 1; + total = 0; + } + else if (content.string[i] == f_iki_syntax_slash_s.string[0]) { + ++total; + } + else if (total) { + total = 0; } } // for if (F_status_is_error_not(state->status) && range.start <= range.stop) { state->status = f_string_dynamic_partial_append(content, range, destination); } + + // Slashes at the end must be escaped. + if (F_status_is_error_not(state->status) && total) { + state->status = f_memory_array_increase_by(total, sizeof(f_char_t), (void **) &destination->string, &destination->used, &destination->size); + + for (j = 0; F_status_is_error_not(state->status) && j < total; ++j) { + state->status = f_string_dynamic_append(f_iki_syntax_slash_s, destination); + } // for + } } if (F_status_is_error_not(state->status)) { diff --git a/level_0/f_iki/c/iki.h b/level_0/f_iki/c/iki.h index 4e2e98c..934e9b5 100644 --- a/level_0/f_iki/c/iki.h +++ b/level_0/f_iki/c/iki.h @@ -140,6 +140,62 @@ extern "C" { #endif // _di_f_iki_eki_read_ /** + * Write an EKI vocabulary and content as an EKI string. + * + * Anything within this source strings will be escaped as necessary. + * + * The destination string may have NULLs. + * + * @param vocabulary + * The EKI vocabulary. + * + * The string must not have length of 0. + * @param content + * The EKI content. + * @param quote + * The quote to use. @todo replace this with a flag, also include wrapper. + * @param destination + * The buffer where the content is written to. + * + * Must not be NULL. + * @param state + * A state for providing flags and handling interrupts during long running operations. + * + * The following f_iki_state_flag_*_e are used: + * - force_wrap: Always use wrapping characters even when not strictly required. + * + * There is no state.handle(). + * There is no "callbacks" structure. + * There is no data structure passed to these functions. + * + * When state.interrupt() returns, only F_interrupt and F_interrupt_not are processed. + * Error bit designates an error but must be passed along with F_interrupt. + * + * Must not be NULL. + * + * This alters state.status: + * F_okay on success. + * + * F_data_not (with error bit) if either the vocabularys array has a length of 0. + * F_interrupt (with error bit) if stopping due to an interrupt. + * F_parameter (with error bit) if a parameter is invalid. + * F_syntax (with error bit) if the vocabulary has unsupported characters (NULL is ignored and does not produce this error). + * + * Errors (with error bit) from: f_memory_array_increase(). + * Errors (with error bit) from: f_string_dynamic_append(). + * Errors (with error bit) from: f_utf_buffer_increment(). + * Errors (with error bit) from: f_utf_is_word_dash_plus(). + * + * @see f_memory_array_increase() + * @see f_string_dynamic_append() + * @see f_utf_buffer_increment() + * @see f_utf_is_word_dash_plus() + */ +#ifndef _di_f_iki_eki_write_ + extern void f_iki_eki_write(const f_string_statics_t vocabularys, const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t * const destination, f_state_t * const state); +#endif // _di_f_iki_eki_write_ + +/** * Determine if an object is a valid IKI object name. * * @param object diff --git a/level_0/f_iki/data/build/settings-tests b/level_0/f_iki/data/build/settings-tests index 33a6885..56bcd51 100644 --- a/level_0/f_iki/data/build/settings-tests +++ b/level_0/f_iki/data/build/settings-tests @@ -25,7 +25,7 @@ build_language c build_libraries -lc -lcmocka build_libraries-individual -lf_memory -lf_string -lf_type_array -lf_utf -lf_iki -build_sources_program test-iki-content_is.c test-iki-content_partial_is.c test-iki-eki_read.c test-iki-object_is.c test-iki-object_partial_is.c test-iki-read.c test-iki-write.c +build_sources_program test-iki-content_is.c test-iki-content_partial_is.c test-iki-eki_read.c test-iki-eki_write.c test-iki-object_is.c test-iki-object_partial_is.c test-iki-read.c test-iki-write.c build_sources_program test-iki-datas_append.c test-iki-datas_append_all.c test-iki-datass_append.c test-iki-datass_append_all.c build_sources_program test-iki-datas_delete_callback.c test-iki-datas_destroy_callback.c test-iki-datass_delete_callback.c test-iki-datass_destroy_callback.c build_sources_program test-iki-ekis_append.c test-iki-ekis_append_all.c test-iki-ekiss_append.c test-iki-ekiss_append_all.c diff --git a/level_0/f_iki/tests/unit/c/test-iki-eki_write.c b/level_0/f_iki/tests/unit/c/test-iki-eki_write.c new file mode 100644 index 0000000..286abab --- /dev/null +++ b/level_0/f_iki/tests/unit/c/test-iki-eki_write.c @@ -0,0 +1,2692 @@ +#include "test-iki.h" +#include "test-iki-write.h" + +#ifdef __cplusplus +extern "C" { +#endif + +void test__f_iki_eki_write__parameter_checking(void **state) { + + f_state_t state_data = f_state_t_initialize; + f_string_dynamic_t destination = f_string_dynamic_t_initialize; + const f_string_static_t empty = macro_f_string_static_t_initialize_1(f_string_empty_s.string, f_string_empty_s.size, f_string_empty_s.used); + const f_string_statics_t vocabularys = f_string_statics_t_initialize; + const f_string_static_t content = macro_f_string_static_t_initialize_1("content", 0, 7); + + state_data.status = F_known_not; + + { + f_iki_eki_write(vocabularys, content, f_iki_syntax_quote_double_s, &destination, 0); + + // The state cannot be set to F_parameter because the state is not passed to the function. + assert_int_equal(state_data.status, F_known_not); + } + + { + f_iki_eki_write(vocabularys, content, f_iki_syntax_quote_grave_s, &destination, 0); + + // The state cannot be set to F_parameter because the state is not passed to the function. + assert_int_equal(state_data.status, F_known_not); + } + + { + f_iki_eki_write(vocabularys, content, f_iki_syntax_quote_single_s, &destination, 0); + + // The state cannot be set to F_parameter because the state is not passed to the function. + assert_int_equal(state_data.status, F_known_not); + } + + { + f_iki_eki_write(vocabularys, content, f_iki_syntax_quote_double_s, 0, &state_data); + + assert_int_equal(state_data.status, F_status_set_error(F_parameter)); + } + + { + f_iki_eki_write(vocabularys, content, empty, &destination, &state_data); + + assert_int_equal(state_data.status, F_status_set_error(F_parameter)); + } + + { + f_iki_eki_write(vocabularys, content, content, &destination, &state_data); + + assert_int_equal(state_data.status, F_status_set_error(F_parameter)); + } +} + +void test__f_iki_eki_write__returns_data_not(void **state) { + + f_state_t state_data = f_state_t_initialize; + f_string_dynamic_t destination = f_string_dynamic_t_initialize; + f_string_static_t empty_children_array[] = { f_string_empty_s }; + const f_string_statics_t empty_children = macro_f_string_statics_t_initialize_2(empty_children_array, 1); + const f_string_statics_t empty_vocabs = f_string_statics_t_initialize; + const f_string_static_t content = macro_f_string_static_t_initialize_1("content", 0, 7); + + { + f_iki_eki_write(empty_vocabs, content, f_iki_syntax_quote_double_s, &destination, &state_data); + + assert_int_equal(F_status_set_fine(state_data.status), F_data_not); + } + + { + f_iki_eki_write(empty_vocabs, content, f_iki_syntax_quote_grave_s, &destination, &state_data); + + assert_int_equal(F_status_set_fine(state_data.status), F_data_not); + } + + { + f_iki_eki_write(empty_vocabs, content, f_iki_syntax_quote_single_s, &destination, &state_data); + + assert_int_equal(F_status_set_fine(state_data.status), F_data_not); + } + + { + f_iki_eki_write(empty_children, content, f_iki_syntax_quote_double_s, &destination, &state_data); + + assert_int_equal(F_status_set_fine(state_data.status), F_data_not); + } + + { + f_iki_eki_write(empty_children, content, f_iki_syntax_quote_grave_s, &destination, &state_data); + + assert_int_equal(F_status_set_fine(state_data.status), F_data_not); + } + + { + f_iki_eki_write(empty_children, content, f_iki_syntax_quote_single_s, &destination, &state_data); + + assert_int_equal(F_status_set_fine(state_data.status), F_data_not); + } +} + +void test__f_iki_eki_write__returns_syntax(void **state) { + + f_state_t state_data = f_state_t_initialize; + f_string_dynamic_t destination = f_string_dynamic_t_initialize; + f_string_static_t content = macro_f_string_static_t_initialize_1("content", 0, 7); + f_string_static_t str_colon = macro_f_string_static_t_initialize_1(":", 0, 1); + f_string_static_t str_space = macro_f_string_static_t_initialize_1(" ", 0, 1); + f_string_static_t str_at = macro_f_string_static_t_initialize_1("@", 0, 1); + f_string_static_t str_bracket_open = macro_f_string_static_t_initialize_1("[", 0, 1); + f_string_static_t str_bracket_close = macro_f_string_static_t_initialize_1("]", 0, 1); + f_string_static_t str_lots = macro_f_string_static_t_initialize_1("This * is [never] going && to be...>%'`\" valid!", 0, 47); + + f_string_static_t str_colon_array[] = { str_colon }; + f_string_static_t str_space_array[] = { str_space }; + f_string_static_t str_at_array[] = { str_at }; + f_string_static_t str_bracket_open_array[] = { str_bracket_open }; + f_string_static_t str_bracket_close_array[] = { str_bracket_close }; + f_string_static_t str_lots_array[] = { str_lots }; + + const f_string_statics_t str_colon_vocabs = macro_f_string_statics_t_initialize_2(str_colon_array, 1); + const f_string_statics_t str_space_vocabs = macro_f_string_statics_t_initialize_2(str_space_array, 1); + const f_string_statics_t str_at_vocabs = macro_f_string_statics_t_initialize_2(str_at_array, 1); + const f_string_statics_t str_bracket_open_vocabs = macro_f_string_statics_t_initialize_2(str_bracket_open_array, 1); + const f_string_statics_t str_bracket_close_vocabs = macro_f_string_statics_t_initialize_2(str_bracket_close_array, 1); + const f_string_statics_t str_lots_vocabs = macro_f_string_statics_t_initialize_2(str_lots_array, 1); + + { + f_iki_eki_write(str_colon_vocabs, content, f_iki_syntax_quote_double_s, &destination, &state_data); + + assert_int_equal(F_status_set_fine(state_data.status), F_syntax); + } + + { + f_iki_eki_write(str_space_vocabs, content, f_iki_syntax_quote_double_s, &destination, &state_data); + + assert_int_equal(F_status_set_fine(state_data.status), F_syntax); + } + + { + f_iki_eki_write(str_at_vocabs, content, f_iki_syntax_quote_double_s, &destination, &state_data); + + assert_int_equal(F_status_set_fine(state_data.status), F_syntax); + } + + { + f_iki_eki_write(str_bracket_open_vocabs, content, f_iki_syntax_quote_double_s, &destination, &state_data); + + assert_int_equal(F_status_set_fine(state_data.status), F_syntax); + } + + { + f_iki_eki_write(str_bracket_close_vocabs, content, f_iki_syntax_quote_double_s, &destination, &state_data); + + assert_int_equal(F_status_set_fine(state_data.status), F_syntax); + } + + { + f_iki_eki_write(str_lots_vocabs, content, f_iki_syntax_quote_double_s, &destination, &state_data); + + assert_int_equal(F_status_set_fine(state_data.status), F_syntax); + } +} + +void test__f_iki_eki_write__works(void **state) { + + mock_unwrap = 1; + + f_state_t state_data = f_state_t_initialize; + f_string_dynamic_t destination = f_string_dynamic_t_initialize; + + f_string_static_t empty = macro_f_string_static_t_initialize_1(f_string_empty_s.string, f_string_empty_s.size, f_string_empty_s.used); + f_string_static_t str_a = macro_f_string_static_t_initialize_1("a", 0, 1); + f_string_static_t str_b = macro_f_string_static_t_initialize_1("b", 0, 1); + f_string_static_t str_iki = macro_f_string_static_t_initialize_1("iki", 0, 3); + f_string_static_t str_has = macro_f_string_static_t_initialize_1("has_CHARS+-", 0, 11); + + f_string_static_t str_a_array[] = { str_a }; + f_string_static_t str_iki_array[] = { str_iki }; + f_string_static_t str_has_array[] = { str_has }; + + const f_string_statics_t str_a_vocabs = macro_f_string_statics_t_initialize_2(str_a_array, 1); + const f_string_statics_t str_iki_vocabs = macro_f_string_statics_t_initialize_2(str_iki_array, 1); + const f_string_statics_t str_has_vocabs = macro_f_string_statics_t_initialize_2(str_has_array, 1); + + f_string_static_t str_content = macro_f_string_static_t_initialize_1("content", 0, 7); + f_string_static_t str_content_quote_double = macro_f_string_static_t_initialize_1("\"content\"", 0, 9); + f_string_static_t str_content_quote_grave = macro_f_string_static_t_initialize_1("`content`", 0, 9); + f_string_static_t str_content_quote_single = macro_f_string_static_t_initialize_1("'content'", 0, 9); + f_string_static_t str_quote_double = macro_f_string_static_t_initialize_1("quote\"s", 0, 7); + f_string_static_t str_quote_grave = macro_f_string_static_t_initialize_1("quote`s", 0, 7); + f_string_static_t str_quote_single = macro_f_string_static_t_initialize_1("quote's", 0, 7); + f_string_static_t str_slash_1 = macro_f_string_static_t_initialize_1("slash\\", 0, 6); + f_string_static_t str_slash_2 = macro_f_string_static_t_initialize_1("slash\\\\", 0, 7); + f_string_static_t str_slash_3 = macro_f_string_static_t_initialize_1("slash\\\\\\", 0, 8); + f_string_static_t str_slash_4 = macro_f_string_static_t_initialize_1("slash\\\\\\\\", 0, 9); + + #define _inline_macro_total_rows 198 + + f_string_statics_t vocabularyss[] = { + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + }; + + f_string_static_t contents[] = { + empty, + str_b, + str_content, + str_content_quote_single, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_single, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_single, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_grave, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_grave, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_grave, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_double, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_double, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_double, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_single, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_single, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_single, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_grave, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_grave, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_grave, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_double, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_double, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_double, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + }; + + f_string_static_t quotes[] = { + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + }; + + uint64_t flags[] = { + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + }; + + f_string_static_t ikis[] = { + macro_f_string_static_t_initialize_1("a:''", 0, 4), + macro_f_string_static_t_initialize_1("a:'b'", 0, 5), + macro_f_string_static_t_initialize_1("a:'content'", 0, 11), + macro_f_string_static_t_initialize_1("a:'\\'content\\''", 0, 15), + macro_f_string_static_t_initialize_1("a:'quote\\'s'", 0, 12), + macro_f_string_static_t_initialize_1("a:'quote`s'", 0, 11), + macro_f_string_static_t_initialize_1("a:'quote\"s'", 0, 11), + macro_f_string_static_t_initialize_1("a:'slash\\\\'", 0, 11), + macro_f_string_static_t_initialize_1("a:'slash\\\\\\\\'", 0, 13), + macro_f_string_static_t_initialize_1("a:'slash\\\\\\\\\\\\'", 0, 15), + macro_f_string_static_t_initialize_1("a:'slash\\\\\\\\\\\\\\\\'", 0, 17), + macro_f_string_static_t_initialize_1("iki:''", 0, 6), + macro_f_string_static_t_initialize_1("iki:'b'", 0, 7), + macro_f_string_static_t_initialize_1("iki:'content'", 0, 13), + macro_f_string_static_t_initialize_1("iki:'\\'content\\''", 0, 17), + macro_f_string_static_t_initialize_1("iki:'quote\\'s'", 0, 14), + macro_f_string_static_t_initialize_1("iki:'quote`s'", 0, 13), + macro_f_string_static_t_initialize_1("iki:'quote\"s'", 0, 13), + macro_f_string_static_t_initialize_1("iki:'slash\\\\'", 0, 13), + macro_f_string_static_t_initialize_1("iki:'slash\\\\\\\\'", 0, 15), + macro_f_string_static_t_initialize_1("iki:'slash\\\\\\\\\\\\'", 0, 17), + macro_f_string_static_t_initialize_1("iki:'slash\\\\\\\\\\\\\\\\'", 0, 19), + macro_f_string_static_t_initialize_1("has_CHARS+-:''", 0, 14), + macro_f_string_static_t_initialize_1("has_CHARS+-:'b'", 0, 15), + macro_f_string_static_t_initialize_1("has_CHARS+-:'content'", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:'\\'content\\''", 0, 25), + macro_f_string_static_t_initialize_1("has_CHARS+-:'quote\\'s'", 0, 22), + macro_f_string_static_t_initialize_1("has_CHARS+-:'quote`s'", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:'quote\"s'", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:'slash\\\\'", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:'slash\\\\\\\\'", 0, 23), + macro_f_string_static_t_initialize_1("has_CHARS+-:'slash\\\\\\\\\\\\'", 0, 25), + macro_f_string_static_t_initialize_1("has_CHARS+-:'slash\\\\\\\\\\\\\\\\'", 0, 27), + macro_f_string_static_t_initialize_1("a:``", 0, 4), + macro_f_string_static_t_initialize_1("a:`b`", 0, 5), + macro_f_string_static_t_initialize_1("a:`content`", 0, 11), + macro_f_string_static_t_initialize_1("a:`\\`content\\``", 0, 15), + macro_f_string_static_t_initialize_1("a:`quote's`", 0, 11), + macro_f_string_static_t_initialize_1("a:`quote\\`s`", 0, 12), + macro_f_string_static_t_initialize_1("a:`quote\"s`", 0, 11), + macro_f_string_static_t_initialize_1("a:`slash\\\\`", 0, 11), + macro_f_string_static_t_initialize_1("a:`slash\\\\\\\\`", 0, 13), + macro_f_string_static_t_initialize_1("a:`slash\\\\\\\\\\\\`", 0, 15), + macro_f_string_static_t_initialize_1("a:`slash\\\\\\\\\\\\\\\\`", 0, 17), + macro_f_string_static_t_initialize_1("iki:``", 0, 6), + macro_f_string_static_t_initialize_1("iki:`b`", 0, 7), + macro_f_string_static_t_initialize_1("iki:`content`", 0, 13), + macro_f_string_static_t_initialize_1("iki:`\\`content\\``", 0, 17), + macro_f_string_static_t_initialize_1("iki:`quote's`", 0, 13), + macro_f_string_static_t_initialize_1("iki:`quote\\`s`", 0, 14), + macro_f_string_static_t_initialize_1("iki:`quote\"s`", 0, 13), + macro_f_string_static_t_initialize_1("iki:`slash\\\\`", 0, 13), + macro_f_string_static_t_initialize_1("iki:`slash\\\\\\\\`", 0, 15), + macro_f_string_static_t_initialize_1("iki:`slash\\\\\\\\\\\\`", 0, 17), + macro_f_string_static_t_initialize_1("iki:`slash\\\\\\\\\\\\\\\\`", 0, 19), + macro_f_string_static_t_initialize_1("has_CHARS+-:``", 0, 14), + macro_f_string_static_t_initialize_1("has_CHARS+-:`b`", 0, 15), + macro_f_string_static_t_initialize_1("has_CHARS+-:`content`", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:`\\`content\\``", 0, 25), + macro_f_string_static_t_initialize_1("has_CHARS+-:`quote's`", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:`quote\\`s`", 0, 22), + macro_f_string_static_t_initialize_1("has_CHARS+-:`quote\"s`", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:`slash\\\\`", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:`slash\\\\\\\\`", 0, 23), + macro_f_string_static_t_initialize_1("has_CHARS+-:`slash\\\\\\\\\\\\`", 0, 25), + macro_f_string_static_t_initialize_1("has_CHARS+-:`slash\\\\\\\\\\\\\\\\`", 0, 27), + macro_f_string_static_t_initialize_1("a:\"\"", 0, 4), + macro_f_string_static_t_initialize_1("a:\"b\"", 0, 5), + macro_f_string_static_t_initialize_1("a:\"content\"", 0, 11), + macro_f_string_static_t_initialize_1("a:\"\\\"content\\\"\"", 0, 15), + macro_f_string_static_t_initialize_1("a:\"quote's\"", 0, 11), + macro_f_string_static_t_initialize_1("a:\"quote`s\"", 0, 11), + macro_f_string_static_t_initialize_1("a:\"quote\\\"s\"", 0, 12), + macro_f_string_static_t_initialize_1("a:\"slash\\\\\"", 0, 11), + macro_f_string_static_t_initialize_1("a:\"slash\\\\\\\\\"", 0, 13), + macro_f_string_static_t_initialize_1("a:\"slash\\\\\\\\\\\\\"", 0, 15), + macro_f_string_static_t_initialize_1("a:\"slash\\\\\\\\\\\\\\\\\"", 0, 17), + macro_f_string_static_t_initialize_1("iki:\"\"", 0, 6), + macro_f_string_static_t_initialize_1("iki:\"b\"", 0, 7), + macro_f_string_static_t_initialize_1("iki:\"content\"", 0, 13), + macro_f_string_static_t_initialize_1("iki:\"\\\"content\\\"\"", 0, 17), + macro_f_string_static_t_initialize_1("iki:\"quote's\"", 0, 13), + macro_f_string_static_t_initialize_1("iki:\"quote`s\"", 0, 13), + macro_f_string_static_t_initialize_1("iki:\"quote\\\"s\"", 0, 14), + macro_f_string_static_t_initialize_1("iki:\"slash\\\\\"", 0, 13), + macro_f_string_static_t_initialize_1("iki:\"slash\\\\\\\\\"", 0, 15), + macro_f_string_static_t_initialize_1("iki:\"slash\\\\\\\\\\\\\"", 0, 17), + macro_f_string_static_t_initialize_1("iki:\"slash\\\\\\\\\\\\\\\\\"", 0, 19), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"\"", 0, 14), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"b\"", 0, 15), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"content\"", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"\\\"content\\\"\"", 0, 25), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"quote's\"", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"quote`s\"", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"quote\\\"s\"", 0, 22), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"slash\\\\\"", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"slash\\\\\\\\\"", 0, 23), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"slash\\\\\\\\\\\\\"", 0, 25), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"slash\\\\\\\\\\\\\\\\\"", 0, 27), + macro_f_string_static_t_initialize_1("[a]:''", 0, 6), + macro_f_string_static_t_initialize_1("[a]:'b'", 0, 7), + macro_f_string_static_t_initialize_1("[a]:'content'", 0, 13), + macro_f_string_static_t_initialize_1("[a]:'\\'content\\''", 0, 17), + macro_f_string_static_t_initialize_1("[a]:'quote\\'s'", 0, 14), + macro_f_string_static_t_initialize_1("[a]:'quote`s'", 0, 13), + macro_f_string_static_t_initialize_1("[a]:'quote\"s'", 0, 13), + macro_f_string_static_t_initialize_1("[a]:'slash\\\\'", 0, 13), + macro_f_string_static_t_initialize_1("[a]:'slash\\\\\\\\'", 0, 15), + macro_f_string_static_t_initialize_1("[a]:'slash\\\\\\\\\\\\'", 0, 17), + macro_f_string_static_t_initialize_1("[a]:'slash\\\\\\\\\\\\\\\\'", 0, 19), + macro_f_string_static_t_initialize_1("[iki]:''", 0, 8), + macro_f_string_static_t_initialize_1("[iki]:'b'", 0, 9), + macro_f_string_static_t_initialize_1("[iki]:'content'", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:'\\'content\\''", 0, 19), + macro_f_string_static_t_initialize_1("[iki]:'quote\\'s'", 0, 16), + macro_f_string_static_t_initialize_1("[iki]:'quote`s'", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:'quote\"s'", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:'slash\\\\'", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:'slash\\\\\\\\'", 0, 17), + macro_f_string_static_t_initialize_1("[iki]:'slash\\\\\\\\\\\\'", 0, 19), + macro_f_string_static_t_initialize_1("[iki]:'slash\\\\\\\\\\\\\\\\'", 0, 21), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:''", 0, 16), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'b'", 0, 17), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'content'", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'\\'content\\''", 0, 27), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'quote\\'s'", 0, 24), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'quote`s'", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'quote\"s'", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'slash\\\\'", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'slash\\\\\\\\'", 0, 25), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'slash\\\\\\\\\\\\'", 0, 27), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'slash\\\\\\\\\\\\\\\\'", 0, 29), + macro_f_string_static_t_initialize_1("[a]:``", 0, 6), + macro_f_string_static_t_initialize_1("[a]:`b`", 0, 7), + macro_f_string_static_t_initialize_1("[a]:`content`", 0, 13), + macro_f_string_static_t_initialize_1("[a]:`\\`content\\``", 0, 17), + macro_f_string_static_t_initialize_1("[a]:`quote's`", 0, 13), + macro_f_string_static_t_initialize_1("[a]:`quote\\`s`", 0, 14), + macro_f_string_static_t_initialize_1("[a]:`quote\"s`", 0, 13), + macro_f_string_static_t_initialize_1("[a]:`slash\\\\`", 0, 13), + macro_f_string_static_t_initialize_1("[a]:`slash\\\\\\\\`", 0, 15), + macro_f_string_static_t_initialize_1("[a]:`slash\\\\\\\\\\\\`", 0, 17), + macro_f_string_static_t_initialize_1("[a]:`slash\\\\\\\\\\\\\\\\`", 0, 19), + macro_f_string_static_t_initialize_1("[iki]:``", 0, 8), + macro_f_string_static_t_initialize_1("[iki]:`b`", 0, 9), + macro_f_string_static_t_initialize_1("[iki]:`content`", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:`\\`content\\``", 0, 19), + macro_f_string_static_t_initialize_1("[iki]:`quote's`", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:`quote\\`s`", 0, 16), + macro_f_string_static_t_initialize_1("[iki]:`quote\"s`", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:`slash\\\\`", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:`slash\\\\\\\\`", 0, 17), + macro_f_string_static_t_initialize_1("[iki]:`slash\\\\\\\\\\\\`", 0, 19), + macro_f_string_static_t_initialize_1("[iki]:`slash\\\\\\\\\\\\\\\\`", 0, 21), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:``", 0, 16), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`b`", 0, 17), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`content`", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`\\`content\\``", 0, 27), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`quote's`", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`quote\\`s`", 0, 24), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`quote\"s`", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`slash\\\\`", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`slash\\\\\\\\`", 0, 25), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`slash\\\\\\\\\\\\`", 0, 27), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`slash\\\\\\\\\\\\\\\\`", 0, 29), + macro_f_string_static_t_initialize_1("[a]:\"\"", 0, 6), + macro_f_string_static_t_initialize_1("[a]:\"b\"", 0, 7), + macro_f_string_static_t_initialize_1("[a]:\"content\"", 0, 13), + macro_f_string_static_t_initialize_1("[a]:\"\\\"content\\\"\"", 0, 17), + macro_f_string_static_t_initialize_1("[a]:\"quote's\"", 0, 13), + macro_f_string_static_t_initialize_1("[a]:\"quote`s\"", 0, 13), + macro_f_string_static_t_initialize_1("[a]:\"quote\\\"s\"", 0, 14), + macro_f_string_static_t_initialize_1("[a]:\"slash\\\\\"", 0, 13), + macro_f_string_static_t_initialize_1("[a]:\"slash\\\\\\\\\"", 0, 15), + macro_f_string_static_t_initialize_1("[a]:\"slash\\\\\\\\\\\\\"", 0, 17), + macro_f_string_static_t_initialize_1("[a]:\"slash\\\\\\\\\\\\\\\\\"", 0, 19), + macro_f_string_static_t_initialize_1("[iki]:\"\"", 0, 8), + macro_f_string_static_t_initialize_1("[iki]:\"b\"", 0, 9), + macro_f_string_static_t_initialize_1("[iki]:\"content\"", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:\"\\\"content\\\"\"", 0, 19), + macro_f_string_static_t_initialize_1("[iki]:\"quote's\"", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:\"quote`s\"", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:\"quote\\\"s\"", 0, 16), + macro_f_string_static_t_initialize_1("[iki]:\"slash\\\\\"", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:\"slash\\\\\\\\\"", 0, 17), + macro_f_string_static_t_initialize_1("[iki]:\"slash\\\\\\\\\\\\\"", 0, 19), + macro_f_string_static_t_initialize_1("[iki]:\"slash\\\\\\\\\\\\\\\\\"", 0, 21), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"\"", 0, 16), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"b\"", 0, 17), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"content\"", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"\\\"content\\\"\"", 0, 27), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"quote's\"", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"quote`s\"", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"quote\\\"s\"", 0, 24), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"slash\\\\\"", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"slash\\\\\\\\\"", 0, 25), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"slash\\\\\\\\\\\\\"", 0, 27), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"slash\\\\\\\\\\\\\\\\\"", 0, 29), + }; + + const f_status_t statuss[] = { + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + }; + + for (uint8_t i = 0; i < _inline_macro_total_rows; ++i) { + + state_data.flag = flags[i]; + destination.used = 0; + + f_iki_eki_write(vocabularyss[i], contents[i], quotes[i], &destination, &state_data); + + assert_int_equal(state_data.status, statuss[i]); + assert_int_equal(destination.used, ikis[i].used); + assert_string_equal(destination.string, ikis[i].string); + + // Clear the string to make any debugging easier. + memset(destination.string, 0, sizeof(destination.used)); + } // for + + if (destination.string) free(destination.string); + + #undef _inline_macro_total_rows +} + +void test__f_iki_eki_write__works_for_multiple(void **state) { + + mock_unwrap = 1; + + f_state_t state_data = f_state_t_initialize; + f_string_dynamic_t destination = f_string_dynamic_t_initialize; + + f_string_static_t empty = macro_f_string_static_t_initialize_1(f_string_empty_s.string, f_string_empty_s.size, f_string_empty_s.used); + f_string_static_t str_a = macro_f_string_static_t_initialize_1("a", 0, 1); + f_string_static_t str_b = macro_f_string_static_t_initialize_1("b", 0, 1); + f_string_static_t str_sea = macro_f_string_static_t_initialize_1("sea", 0, 3); + f_string_static_t str_iki = macro_f_string_static_t_initialize_1("iki", 0, 3); + f_string_static_t str_has = macro_f_string_static_t_initialize_1("has_CHARS+-", 0, 11); + + f_string_static_t str_a_array[] = { str_a, str_b }; + f_string_static_t str_iki_array[] = { str_iki, str_sea }; + f_string_static_t str_has_array[] = { str_has, str_b, str_sea }; + + const f_string_statics_t str_a_vocabs = macro_f_string_statics_t_initialize_2(str_a_array, 2); + const f_string_statics_t str_iki_vocabs = macro_f_string_statics_t_initialize_2(str_iki_array, 2); + const f_string_statics_t str_has_vocabs = macro_f_string_statics_t_initialize_2(str_has_array, 3); + + f_string_static_t str_content = macro_f_string_static_t_initialize_1("content", 0, 7); + f_string_static_t str_content_quote_double = macro_f_string_static_t_initialize_1("\"content\"", 0, 9); + f_string_static_t str_content_quote_grave = macro_f_string_static_t_initialize_1("`content`", 0, 9); + f_string_static_t str_content_quote_single = macro_f_string_static_t_initialize_1("'content'", 0, 9); + f_string_static_t str_quote_double = macro_f_string_static_t_initialize_1("quote\"s", 0, 7); + f_string_static_t str_quote_grave = macro_f_string_static_t_initialize_1("quote`s", 0, 7); + f_string_static_t str_quote_single = macro_f_string_static_t_initialize_1("quote's", 0, 7); + f_string_static_t str_slash_1 = macro_f_string_static_t_initialize_1("slash\\", 0, 6); + f_string_static_t str_slash_2 = macro_f_string_static_t_initialize_1("slash\\\\", 0, 7); + f_string_static_t str_slash_3 = macro_f_string_static_t_initialize_1("slash\\\\\\", 0, 8); + f_string_static_t str_slash_4 = macro_f_string_static_t_initialize_1("slash\\\\\\\\", 0, 9); + + #define _inline_macro_total_rows 198 + + f_string_statics_t vocabularyss[] = { + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_a_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_iki_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + str_has_vocabs, + }; + + f_string_static_t contents[] = { + empty, + str_b, + str_content, + str_content_quote_single, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_single, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_single, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_grave, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_grave, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_grave, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_double, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_double, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_double, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_single, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_single, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_single, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_grave, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_grave, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_grave, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_double, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_double, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + empty, + str_b, + str_content, + str_content_quote_double, + str_quote_single, + str_quote_grave, + str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, + }; + + f_string_static_t quotes[] = { + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + }; + + uint64_t flags[] = { + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + }; + + f_string_static_t ikis[] = { + macro_f_string_static_t_initialize_1("a:b:''", 0, 6), + macro_f_string_static_t_initialize_1("a:b:'b'", 0, 7), + macro_f_string_static_t_initialize_1("a:b:'content'", 0, 13), + macro_f_string_static_t_initialize_1("a:b:'\\'content\\''", 0, 17), + macro_f_string_static_t_initialize_1("a:b:'quote\\'s'", 0, 14), + macro_f_string_static_t_initialize_1("a:b:'quote`s'", 0, 13), + macro_f_string_static_t_initialize_1("a:b:'quote\"s'", 0, 13), + macro_f_string_static_t_initialize_1("a:b:'slash\\\\'", 0, 13), + macro_f_string_static_t_initialize_1("a:b:'slash\\\\\\\\'", 0, 15), + macro_f_string_static_t_initialize_1("a:b:'slash\\\\\\\\\\\\'", 0, 17), + macro_f_string_static_t_initialize_1("a:b:'slash\\\\\\\\\\\\\\\\'", 0, 19), + macro_f_string_static_t_initialize_1("iki:sea:''", 0, 10), + macro_f_string_static_t_initialize_1("iki:sea:'b'", 0, 11), + macro_f_string_static_t_initialize_1("iki:sea:'content'", 0, 17), + macro_f_string_static_t_initialize_1("iki:sea:'\\'content\\''", 0, 21), + macro_f_string_static_t_initialize_1("iki:sea:'quote\\'s'", 0, 18), + macro_f_string_static_t_initialize_1("iki:sea:'quote`s'", 0, 17), + macro_f_string_static_t_initialize_1("iki:sea:'quote\"s'", 0, 17), + macro_f_string_static_t_initialize_1("iki:sea:'slash\\\\'", 0, 17), + macro_f_string_static_t_initialize_1("iki:sea:'slash\\\\\\\\'", 0, 19), + macro_f_string_static_t_initialize_1("iki:sea:'slash\\\\\\\\\\\\'", 0, 21), + macro_f_string_static_t_initialize_1("iki:sea:'slash\\\\\\\\\\\\\\\\'", 0, 23), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:''", 0, 20), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:'b'", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:'content'", 0, 27), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:'\\'content\\''", 0, 31), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:'quote\\'s'", 0, 28), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:'quote`s'", 0, 27), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:'quote\"s'", 0, 27), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:'slash\\\\'", 0, 27), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:'slash\\\\\\\\'", 0, 29), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:'slash\\\\\\\\\\\\'", 0, 31), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:'slash\\\\\\\\\\\\\\\\'", 0, 33), + macro_f_string_static_t_initialize_1("a:b:``", 0, 6), + macro_f_string_static_t_initialize_1("a:b:`b`", 0, 7), + macro_f_string_static_t_initialize_1("a:b:`content`", 0, 13), + macro_f_string_static_t_initialize_1("a:b:`\\`content\\``", 0, 17), + macro_f_string_static_t_initialize_1("a:b:`quote's`", 0, 13), + macro_f_string_static_t_initialize_1("a:b:`quote\\`s`", 0, 14), + macro_f_string_static_t_initialize_1("a:b:`quote\"s`", 0, 13), + macro_f_string_static_t_initialize_1("a:b:`slash\\\\`", 0, 13), + macro_f_string_static_t_initialize_1("a:b:`slash\\\\\\\\`", 0, 15), + macro_f_string_static_t_initialize_1("a:b:`slash\\\\\\\\\\\\`", 0, 17), + macro_f_string_static_t_initialize_1("a:b:`slash\\\\\\\\\\\\\\\\`", 0, 19), + macro_f_string_static_t_initialize_1("iki:sea:``", 0, 10), + macro_f_string_static_t_initialize_1("iki:sea:`b`", 0, 11), + macro_f_string_static_t_initialize_1("iki:sea:`content`", 0, 17), + macro_f_string_static_t_initialize_1("iki:sea:`\\`content\\``", 0, 21), + macro_f_string_static_t_initialize_1("iki:sea:`quote's`", 0, 17), + macro_f_string_static_t_initialize_1("iki:sea:`quote\\`s`", 0, 18), + macro_f_string_static_t_initialize_1("iki:sea:`quote\"s`", 0, 17), + macro_f_string_static_t_initialize_1("iki:sea:`slash\\\\`", 0, 17), + macro_f_string_static_t_initialize_1("iki:sea:`slash\\\\\\\\`", 0, 19), + macro_f_string_static_t_initialize_1("iki:sea:`slash\\\\\\\\\\\\`", 0, 21), + macro_f_string_static_t_initialize_1("iki:sea:`slash\\\\\\\\\\\\\\\\`", 0, 23), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:``", 0, 20), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:`b`", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:`content`", 0, 27), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:`\\`content\\``", 0, 31), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:`quote's`", 0, 27), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:`quote\\`s`", 0, 28), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:`quote\"s`", 0, 27), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:`slash\\\\`", 0, 27), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:`slash\\\\\\\\`", 0, 29), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:`slash\\\\\\\\\\\\`", 0, 31), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:`slash\\\\\\\\\\\\\\\\`", 0, 33), + macro_f_string_static_t_initialize_1("a:b:\"\"", 0, 6), + macro_f_string_static_t_initialize_1("a:b:\"b\"", 0, 7), + macro_f_string_static_t_initialize_1("a:b:\"content\"", 0, 13), + macro_f_string_static_t_initialize_1("a:b:\"\\\"content\\\"\"", 0, 17), + macro_f_string_static_t_initialize_1("a:b:\"quote's\"", 0, 13), + macro_f_string_static_t_initialize_1("a:b:\"quote`s\"", 0, 13), + macro_f_string_static_t_initialize_1("a:b:\"quote\\\"s\"", 0, 14), + macro_f_string_static_t_initialize_1("a:b:\"slash\\\\\"", 0, 13), + macro_f_string_static_t_initialize_1("a:b:\"slash\\\\\\\\\"", 0, 15), + macro_f_string_static_t_initialize_1("a:b:\"slash\\\\\\\\\\\\\"", 0, 17), + macro_f_string_static_t_initialize_1("a:b:\"slash\\\\\\\\\\\\\\\\\"", 0, 19), + macro_f_string_static_t_initialize_1("iki:sea:\"\"", 0, 10), + macro_f_string_static_t_initialize_1("iki:sea:\"b\"", 0, 11), + macro_f_string_static_t_initialize_1("iki:sea:\"content\"", 0, 17), + macro_f_string_static_t_initialize_1("iki:sea:\"\\\"content\\\"\"", 0, 21), + macro_f_string_static_t_initialize_1("iki:sea:\"quote's\"", 0, 17), + macro_f_string_static_t_initialize_1("iki:sea:\"quote`s\"", 0, 17), + macro_f_string_static_t_initialize_1("iki:sea:\"quote\\\"s\"", 0, 18), + macro_f_string_static_t_initialize_1("iki:sea:\"slash\\\\\"", 0, 17), + macro_f_string_static_t_initialize_1("iki:sea:\"slash\\\\\\\\\"", 0, 19), + macro_f_string_static_t_initialize_1("iki:sea:\"slash\\\\\\\\\\\\\"", 0, 21), + macro_f_string_static_t_initialize_1("iki:sea:\"slash\\\\\\\\\\\\\\\\\"", 0, 23), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:\"\"", 0, 20), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:\"b\"", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:\"content\"", 0, 27), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:\"\\\"content\\\"\"", 0, 31), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:\"quote's\"", 0, 27), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:\"quote`s\"", 0, 27), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:\"quote\\\"s\"", 0, 28), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:\"slash\\\\\"", 0, 27), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:\"slash\\\\\\\\\"", 0, 29), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:\"slash\\\\\\\\\\\\\"", 0, 31), + macro_f_string_static_t_initialize_1("has_CHARS+-:b:sea:\"slash\\\\\\\\\\\\\\\\\"", 0, 33), + macro_f_string_static_t_initialize_1("[a:b]:''", 0, 8), + macro_f_string_static_t_initialize_1("[a:b]:'b'", 0, 9), + macro_f_string_static_t_initialize_1("[a:b]:'content'", 0, 15), + macro_f_string_static_t_initialize_1("[a:b]:'\\'content\\''", 0, 19), + macro_f_string_static_t_initialize_1("[a:b]:'quote\\'s'", 0, 16), + macro_f_string_static_t_initialize_1("[a:b]:'quote`s'", 0, 15), + macro_f_string_static_t_initialize_1("[a:b]:'quote\"s'", 0, 15), + macro_f_string_static_t_initialize_1("[a:b]:'slash\\\\'", 0, 15), + macro_f_string_static_t_initialize_1("[a:b]:'slash\\\\\\\\'", 0, 17), + macro_f_string_static_t_initialize_1("[a:b]:'slash\\\\\\\\\\\\'", 0, 19), + macro_f_string_static_t_initialize_1("[a:b]:'slash\\\\\\\\\\\\\\\\'", 0, 21), + macro_f_string_static_t_initialize_1("[iki:sea]:''", 0, 12), + macro_f_string_static_t_initialize_1("[iki:sea]:'b'", 0, 13), + macro_f_string_static_t_initialize_1("[iki:sea]:'content'", 0, 19), + macro_f_string_static_t_initialize_1("[iki:sea]:'\\'content\\''", 0, 23), + macro_f_string_static_t_initialize_1("[iki:sea]:'quote\\'s'", 0, 20), + macro_f_string_static_t_initialize_1("[iki:sea]:'quote`s'", 0, 19), + macro_f_string_static_t_initialize_1("[iki:sea]:'quote\"s'", 0, 19), + macro_f_string_static_t_initialize_1("[iki:sea]:'slash\\\\'", 0, 19), + macro_f_string_static_t_initialize_1("[iki:sea]:'slash\\\\\\\\'", 0, 21), + macro_f_string_static_t_initialize_1("[iki:sea]:'slash\\\\\\\\\\\\'", 0, 23), + macro_f_string_static_t_initialize_1("[iki:sea]:'slash\\\\\\\\\\\\\\\\'", 0, 25), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:''", 0, 22), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:'b'", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:'content'", 0, 29), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:'\\'content\\''", 0, 33), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:'quote\\'s'", 0, 30), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:'quote`s'", 0, 29), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:'quote\"s'", 0, 29), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:'slash\\\\'", 0, 29), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:'slash\\\\\\\\'", 0, 31), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:'slash\\\\\\\\\\\\'", 0, 33), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:'slash\\\\\\\\\\\\\\\\'", 0, 35), + macro_f_string_static_t_initialize_1("[a:b]:``", 0, 8), + macro_f_string_static_t_initialize_1("[a:b]:`b`", 0, 9), + macro_f_string_static_t_initialize_1("[a:b]:`content`", 0, 15), + macro_f_string_static_t_initialize_1("[a:b]:`\\`content\\``", 0, 19), + macro_f_string_static_t_initialize_1("[a:b]:`quote's`", 0, 15), + macro_f_string_static_t_initialize_1("[a:b]:`quote\\`s`", 0, 16), + macro_f_string_static_t_initialize_1("[a:b]:`quote\"s`", 0, 15), + macro_f_string_static_t_initialize_1("[a:b]:`slash\\\\`", 0, 15), + macro_f_string_static_t_initialize_1("[a:b]:`slash\\\\\\\\`", 0, 17), + macro_f_string_static_t_initialize_1("[a:b]:`slash\\\\\\\\\\\\`", 0, 19), + macro_f_string_static_t_initialize_1("[a:b]:`slash\\\\\\\\\\\\\\\\`", 0, 21), + macro_f_string_static_t_initialize_1("[iki:sea]:``", 0, 12), + macro_f_string_static_t_initialize_1("[iki:sea]:`b`", 0, 13), + macro_f_string_static_t_initialize_1("[iki:sea]:`content`", 0, 19), + macro_f_string_static_t_initialize_1("[iki:sea]:`\\`content\\``", 0, 23), + macro_f_string_static_t_initialize_1("[iki:sea]:`quote's`", 0, 19), + macro_f_string_static_t_initialize_1("[iki:sea]:`quote\\`s`", 0, 20), + macro_f_string_static_t_initialize_1("[iki:sea]:`quote\"s`", 0, 19), + macro_f_string_static_t_initialize_1("[iki:sea]:`slash\\\\`", 0, 19), + macro_f_string_static_t_initialize_1("[iki:sea]:`slash\\\\\\\\`", 0, 21), + macro_f_string_static_t_initialize_1("[iki:sea]:`slash\\\\\\\\\\\\`", 0, 23), + macro_f_string_static_t_initialize_1("[iki:sea]:`slash\\\\\\\\\\\\\\\\`", 0, 25), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:``", 0, 22), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:`b`", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:`content`", 0, 29), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:`\\`content\\``", 0, 33), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:`quote's`", 0, 29), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:`quote\\`s`", 0, 30), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:`quote\"s`", 0, 29), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:`slash\\\\`", 0, 29), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:`slash\\\\\\\\`", 0, 31), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:`slash\\\\\\\\\\\\`", 0, 33), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:`slash\\\\\\\\\\\\\\\\`", 0, 35), + macro_f_string_static_t_initialize_1("[a:b]:\"\"", 0, 8), + macro_f_string_static_t_initialize_1("[a:b]:\"b\"", 0, 9), + macro_f_string_static_t_initialize_1("[a:b]:\"content\"", 0, 15), + macro_f_string_static_t_initialize_1("[a:b]:\"\\\"content\\\"\"", 0, 19), + macro_f_string_static_t_initialize_1("[a:b]:\"quote's\"", 0, 15), + macro_f_string_static_t_initialize_1("[a:b]:\"quote`s\"", 0, 15), + macro_f_string_static_t_initialize_1("[a:b]:\"quote\\\"s\"", 0, 16), + macro_f_string_static_t_initialize_1("[a:b]:\"slash\\\\\"", 0, 15), + macro_f_string_static_t_initialize_1("[a:b]:\"slash\\\\\\\\\"", 0, 17), + macro_f_string_static_t_initialize_1("[a:b]:\"slash\\\\\\\\\\\\\"", 0, 19), + macro_f_string_static_t_initialize_1("[a:b]:\"slash\\\\\\\\\\\\\\\\\"", 0, 21), + macro_f_string_static_t_initialize_1("[iki:sea]:\"\"", 0, 12), + macro_f_string_static_t_initialize_1("[iki:sea]:\"b\"", 0, 13), + macro_f_string_static_t_initialize_1("[iki:sea]:\"content\"", 0, 19), + macro_f_string_static_t_initialize_1("[iki:sea]:\"\\\"content\\\"\"", 0, 23), + macro_f_string_static_t_initialize_1("[iki:sea]:\"quote's\"", 0, 19), + macro_f_string_static_t_initialize_1("[iki:sea]:\"quote`s\"", 0, 19), + macro_f_string_static_t_initialize_1("[iki:sea]:\"quote\\\"s\"", 0, 20), + macro_f_string_static_t_initialize_1("[iki:sea]:\"slash\\\\\"", 0, 19), + macro_f_string_static_t_initialize_1("[iki:sea]:\"slash\\\\\\\\\"", 0, 21), + macro_f_string_static_t_initialize_1("[iki:sea]:\"slash\\\\\\\\\\\\\"", 0, 23), + macro_f_string_static_t_initialize_1("[iki:sea]:\"slash\\\\\\\\\\\\\\\\\"", 0, 25), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:\"\"", 0, 22), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:\"b\"", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:\"content\"", 0, 29), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:\"\\\"content\\\"\"", 0, 33), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:\"quote's\"", 0, 29), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:\"quote`s\"", 0, 29), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:\"quote\\\"s\"", 0, 30), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:\"slash\\\\\"", 0, 29), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:\"slash\\\\\\\\\"", 0, 31), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:\"slash\\\\\\\\\\\\\"", 0, 33), + macro_f_string_static_t_initialize_1("[has_CHARS+-:b:sea]:\"slash\\\\\\\\\\\\\\\\\"", 0, 35), + }; + + const f_status_t statuss[] = { + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + }; + + for (uint8_t i = 0; i < _inline_macro_total_rows; ++i) { + + state_data.flag = flags[i]; + destination.used = 0; + + f_iki_eki_write(vocabularyss[i], contents[i], quotes[i], &destination, &state_data); + + assert_int_equal(state_data.status, statuss[i]); + assert_int_equal(destination.used, ikis[i].used); + assert_string_equal(destination.string, ikis[i].string); + + // Clear the string to make any debugging easier. + memset(destination.string, 0, sizeof(destination.used)); + } // for + + if (destination.string) free(destination.string); + + #undef _inline_macro_total_rows +} + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_iki/tests/unit/c/test-iki-eki_write.h b/level_0/f_iki/tests/unit/c/test-iki-eki_write.h new file mode 100644 index 0000000..f43b4ae --- /dev/null +++ b/level_0/f_iki/tests/unit/c/test-iki-eki_write.h @@ -0,0 +1,48 @@ +/** + * FLL - Level 0 + * + * Project: IKI + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Test the iki project. + */ +#ifndef _TEST__F_iki_eki_write_h +#define _TEST__F_iki_eki_write_h + +/** + * Test that parameter checking works as expected. + * + * @see f_iki_eki_write() + */ +extern void test__f_iki_eki_write__parameter_checking(void **state); + +/** + * Test that function returns F_data_not. + * + * @see f_iki_eki_write() + */ +extern void test__f_iki_eki_write__returns_data_not(void **state); + +/** + * Test that function returns F_syntax. + * + * @see f_iki_eki_write() + */ +extern void test__f_iki_eki_write__returns_syntax(void **state); + +/** + * Test that function works. + * + * @see f_iki_eki_write() + */ +extern void test__f_iki_eki_write__works(void **state); + +/** + * Test that function works for multiple vocabularies. + * + * @see f_iki_eki_write() + */ +extern void test__f_iki_eki_write__works_for_multiple(void **state); + +#endif // _TEST__F_iki_eki_write_h 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 3d288f5..86fe245 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,9 +112,9 @@ void test__f_iki_read__works(void **state) { macro_f_string_static_t_initialize_1("IKI Content:\"May have spaces\\\" and quotes.\"", 0, 43), macro_f_string_static_t_initialize_1("IKI Content:'May have spaces\\' and\" quotes.'", 0, 44), 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("url:'https://localhost/fake-0.1.0.tar.gz?query=xx¶meter=yyy%20' end.", 0, 72), + macro_f_string_static_t_initialize_1("url:\"https://localhost/fake-0.1.0.tar.gz?query=xx¶meter=yyy%20\" end.", 0, 72), + macro_f_string_static_t_initialize_1("url:`https://localhost/fake-0.1.0.tar.gz?query=xx¶meter=yyy%20` end.", 0, 72), macro_f_string_static_t_initialize_1("iki:'\"`' iki:'`\"'", 0, 17), macro_f_string_static_t_initialize_1("[iki]:\"one\"", 0, 11), macro_f_string_static_t_initialize_1("[iki]\\:\"none\"", 0, 13), diff --git a/level_0/f_iki/tests/unit/c/test-iki-write.c b/level_0/f_iki/tests/unit/c/test-iki-write.c index 32d2164..3ba965a 100644 --- a/level_0/f_iki/tests/unit/c/test-iki-write.c +++ b/level_0/f_iki/tests/unit/c/test-iki-write.c @@ -144,14 +144,18 @@ void test__f_iki_write__works(void **state) { f_string_static_t str_has = macro_f_string_static_t_initialize_1("has_CHARS+-", 0, 11); f_string_static_t str_content = macro_f_string_static_t_initialize_1("content", 0, 7); - f_string_static_t str_content_quote_single = macro_f_string_static_t_initialize_1("'content'", 0, 9); - f_string_static_t str_content_quote_grave = macro_f_string_static_t_initialize_1("`content`", 0, 9); f_string_static_t str_content_quote_double = macro_f_string_static_t_initialize_1("\"content\"", 0, 9); - f_string_static_t str_quote_single = macro_f_string_static_t_initialize_1("quote's", 0, 7); - f_string_static_t str_quote_grave = macro_f_string_static_t_initialize_1("quote`s", 0, 7); + f_string_static_t str_content_quote_grave = macro_f_string_static_t_initialize_1("`content`", 0, 9); + f_string_static_t str_content_quote_single = macro_f_string_static_t_initialize_1("'content'", 0, 9); f_string_static_t str_quote_double = macro_f_string_static_t_initialize_1("quote\"s", 0, 7); + f_string_static_t str_quote_grave = macro_f_string_static_t_initialize_1("quote`s", 0, 7); + f_string_static_t str_quote_single = macro_f_string_static_t_initialize_1("quote's", 0, 7); + f_string_static_t str_slash_1 = macro_f_string_static_t_initialize_1("slash\\", 0, 6); + f_string_static_t str_slash_2 = macro_f_string_static_t_initialize_1("slash\\\\", 0, 7); + f_string_static_t str_slash_3 = macro_f_string_static_t_initialize_1("slash\\\\\\", 0, 8); + f_string_static_t str_slash_4 = macro_f_string_static_t_initialize_1("slash\\\\\\\\", 0, 9); - #define _inline_macro_total_rows 126 + #define _inline_macro_total_rows 198 f_string_static_t vocabularys[] = { str_a, @@ -161,6 +165,13 @@ void test__f_iki_write__works(void **state) { str_a, str_a, str_a, + str_a, + str_a, + str_a, + str_a, + str_iki, + str_iki, + str_iki, str_iki, str_iki, str_iki, @@ -168,6 +179,10 @@ void test__f_iki_write__works(void **state) { str_iki, str_iki, str_iki, + str_iki, + str_has, + str_has, + str_has, str_has, str_has, str_has, @@ -175,6 +190,11 @@ void test__f_iki_write__works(void **state) { str_has, str_has, str_has, + str_has, + str_a, + str_a, + str_a, + str_a, str_a, str_a, str_a, @@ -189,6 +209,10 @@ void test__f_iki_write__works(void **state) { str_iki, str_iki, str_iki, + str_iki, + str_iki, + str_iki, + str_iki, str_has, str_has, str_has, @@ -196,6 +220,11 @@ void test__f_iki_write__works(void **state) { str_has, str_has, str_has, + str_has, + str_has, + str_has, + str_has, + str_a, str_a, str_a, str_a, @@ -203,6 +232,10 @@ void test__f_iki_write__works(void **state) { str_a, str_a, str_a, + str_a, + str_a, + str_a, + str_iki, str_iki, str_iki, str_iki, @@ -210,6 +243,11 @@ void test__f_iki_write__works(void **state) { str_iki, str_iki, str_iki, + str_iki, + str_iki, + str_iki, + str_has, + str_has, str_has, str_has, str_has, @@ -217,6 +255,11 @@ void test__f_iki_write__works(void **state) { str_has, str_has, str_has, + str_has, + str_has, + str_a, + str_a, + str_a, str_a, str_a, str_a, @@ -224,6 +267,11 @@ void test__f_iki_write__works(void **state) { str_a, str_a, str_a, + str_a, + str_iki, + str_iki, + str_iki, + str_iki, str_iki, str_iki, str_iki, @@ -238,6 +286,10 @@ void test__f_iki_write__works(void **state) { str_has, str_has, str_has, + str_has, + str_has, + str_has, + str_has, str_a, str_a, str_a, @@ -245,6 +297,11 @@ void test__f_iki_write__works(void **state) { str_a, str_a, str_a, + str_a, + str_a, + str_a, + str_a, + str_iki, str_iki, str_iki, str_iki, @@ -252,6 +309,10 @@ void test__f_iki_write__works(void **state) { str_iki, str_iki, str_iki, + str_iki, + str_iki, + str_iki, + str_has, str_has, str_has, str_has, @@ -259,6 +320,11 @@ void test__f_iki_write__works(void **state) { str_has, str_has, str_has, + str_has, + str_has, + str_has, + str_a, + str_a, str_a, str_a, str_a, @@ -266,6 +332,10 @@ void test__f_iki_write__works(void **state) { str_a, str_a, str_a, + str_a, + str_a, + str_iki, + str_iki, str_iki, str_iki, str_iki, @@ -273,6 +343,12 @@ void test__f_iki_write__works(void **state) { str_iki, str_iki, str_iki, + str_iki, + str_iki, + str_has, + str_has, + str_has, + str_has, str_has, str_has, str_has, @@ -290,6 +366,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -297,6 +377,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -304,6 +388,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -311,6 +399,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -318,6 +410,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -325,6 +421,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -332,6 +432,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -339,6 +443,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -346,6 +454,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -353,6 +465,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -360,6 +476,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -367,6 +487,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -374,6 +498,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -381,6 +509,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -388,6 +520,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -395,6 +531,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -402,6 +542,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, empty, str_b, str_content, @@ -409,6 +553,10 @@ void test__f_iki_write__works(void **state) { str_quote_single, str_quote_grave, str_quote_double, + str_slash_1, + str_slash_2, + str_slash_3, + str_slash_4, }; f_string_static_t quotes[] = { @@ -433,6 +581,19 @@ void test__f_iki_write__works(void **state) { f_iki_syntax_quote_single_s, f_iki_syntax_quote_single_s, f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_grave_s, f_iki_syntax_quote_grave_s, f_iki_syntax_quote_grave_s, f_iki_syntax_quote_grave_s, @@ -454,6 +615,24 @@ void test__f_iki_write__works(void **state) { f_iki_syntax_quote_grave_s, f_iki_syntax_quote_grave_s, f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, f_iki_syntax_quote_double_s, f_iki_syntax_quote_double_s, f_iki_syntax_quote_double_s, @@ -475,6 +654,16 @@ void test__f_iki_write__works(void **state) { f_iki_syntax_quote_double_s, f_iki_syntax_quote_double_s, f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, f_iki_syntax_quote_single_s, f_iki_syntax_quote_single_s, f_iki_syntax_quote_single_s, @@ -496,6 +685,15 @@ void test__f_iki_write__works(void **state) { f_iki_syntax_quote_single_s, f_iki_syntax_quote_single_s, f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_single_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, f_iki_syntax_quote_grave_s, f_iki_syntax_quote_grave_s, f_iki_syntax_quote_grave_s, @@ -517,6 +715,28 @@ void test__f_iki_write__works(void **state) { f_iki_syntax_quote_grave_s, f_iki_syntax_quote_grave_s, f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_grave_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, + f_iki_syntax_quote_double_s, f_iki_syntax_quote_double_s, f_iki_syntax_quote_double_s, f_iki_syntax_quote_double_s, @@ -604,6 +824,78 @@ void test__f_iki_write__works(void **state) { 0, 0, 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, + f_iki_state_flag_force_wrap_e, f_iki_state_flag_force_wrap_e, f_iki_state_flag_force_wrap_e, f_iki_state_flag_force_wrap_e, @@ -677,6 +969,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("a:'quote\\'s'", 0, 12), macro_f_string_static_t_initialize_1("a:'quote`s'", 0, 11), macro_f_string_static_t_initialize_1("a:'quote\"s'", 0, 11), + macro_f_string_static_t_initialize_1("a:'slash\\\\'", 0, 11), + macro_f_string_static_t_initialize_1("a:'slash\\\\\\\\'", 0, 13), + macro_f_string_static_t_initialize_1("a:'slash\\\\\\\\\\\\'", 0, 15), + macro_f_string_static_t_initialize_1("a:'slash\\\\\\\\\\\\\\\\'", 0, 17), macro_f_string_static_t_initialize_1("iki:''", 0, 6), macro_f_string_static_t_initialize_1("iki:'b'", 0, 7), macro_f_string_static_t_initialize_1("iki:'content'", 0, 13), @@ -684,6 +980,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("iki:'quote\\'s'", 0, 14), macro_f_string_static_t_initialize_1("iki:'quote`s'", 0, 13), macro_f_string_static_t_initialize_1("iki:'quote\"s'", 0, 13), + macro_f_string_static_t_initialize_1("iki:'slash\\\\'", 0, 13), + macro_f_string_static_t_initialize_1("iki:'slash\\\\\\\\'", 0, 15), + macro_f_string_static_t_initialize_1("iki:'slash\\\\\\\\\\\\'", 0, 17), + macro_f_string_static_t_initialize_1("iki:'slash\\\\\\\\\\\\\\\\'", 0, 19), macro_f_string_static_t_initialize_1("has_CHARS+-:''", 0, 14), macro_f_string_static_t_initialize_1("has_CHARS+-:'b'", 0, 15), macro_f_string_static_t_initialize_1("has_CHARS+-:'content'", 0, 21), @@ -691,6 +991,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("has_CHARS+-:'quote\\'s'", 0, 22), macro_f_string_static_t_initialize_1("has_CHARS+-:'quote`s'", 0, 21), macro_f_string_static_t_initialize_1("has_CHARS+-:'quote\"s'", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:'slash\\\\'", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:'slash\\\\\\\\'", 0, 23), + macro_f_string_static_t_initialize_1("has_CHARS+-:'slash\\\\\\\\\\\\'", 0, 25), + macro_f_string_static_t_initialize_1("has_CHARS+-:'slash\\\\\\\\\\\\\\\\'", 0, 27), macro_f_string_static_t_initialize_1("a:``", 0, 4), macro_f_string_static_t_initialize_1("a:`b`", 0, 5), macro_f_string_static_t_initialize_1("a:`content`", 0, 11), @@ -698,6 +1002,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("a:`quote's`", 0, 11), macro_f_string_static_t_initialize_1("a:`quote\\`s`", 0, 12), macro_f_string_static_t_initialize_1("a:`quote\"s`", 0, 11), + macro_f_string_static_t_initialize_1("a:`slash\\\\`", 0, 11), + macro_f_string_static_t_initialize_1("a:`slash\\\\\\\\`", 0, 13), + macro_f_string_static_t_initialize_1("a:`slash\\\\\\\\\\\\`", 0, 15), + macro_f_string_static_t_initialize_1("a:`slash\\\\\\\\\\\\\\\\`", 0, 17), macro_f_string_static_t_initialize_1("iki:``", 0, 6), macro_f_string_static_t_initialize_1("iki:`b`", 0, 7), macro_f_string_static_t_initialize_1("iki:`content`", 0, 13), @@ -705,6 +1013,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("iki:`quote's`", 0, 13), macro_f_string_static_t_initialize_1("iki:`quote\\`s`", 0, 14), macro_f_string_static_t_initialize_1("iki:`quote\"s`", 0, 13), + macro_f_string_static_t_initialize_1("iki:`slash\\\\`", 0, 13), + macro_f_string_static_t_initialize_1("iki:`slash\\\\\\\\`", 0, 15), + macro_f_string_static_t_initialize_1("iki:`slash\\\\\\\\\\\\`", 0, 17), + macro_f_string_static_t_initialize_1("iki:`slash\\\\\\\\\\\\\\\\`", 0, 19), macro_f_string_static_t_initialize_1("has_CHARS+-:``", 0, 14), macro_f_string_static_t_initialize_1("has_CHARS+-:`b`", 0, 15), macro_f_string_static_t_initialize_1("has_CHARS+-:`content`", 0, 21), @@ -712,6 +1024,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("has_CHARS+-:`quote's`", 0, 21), macro_f_string_static_t_initialize_1("has_CHARS+-:`quote\\`s`", 0, 22), macro_f_string_static_t_initialize_1("has_CHARS+-:`quote\"s`", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:`slash\\\\`", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:`slash\\\\\\\\`", 0, 23), + macro_f_string_static_t_initialize_1("has_CHARS+-:`slash\\\\\\\\\\\\`", 0, 25), + macro_f_string_static_t_initialize_1("has_CHARS+-:`slash\\\\\\\\\\\\\\\\`", 0, 27), macro_f_string_static_t_initialize_1("a:\"\"", 0, 4), macro_f_string_static_t_initialize_1("a:\"b\"", 0, 5), macro_f_string_static_t_initialize_1("a:\"content\"", 0, 11), @@ -719,6 +1035,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("a:\"quote's\"", 0, 11), macro_f_string_static_t_initialize_1("a:\"quote`s\"", 0, 11), macro_f_string_static_t_initialize_1("a:\"quote\\\"s\"", 0, 12), + macro_f_string_static_t_initialize_1("a:\"slash\\\\\"", 0, 11), + macro_f_string_static_t_initialize_1("a:\"slash\\\\\\\\\"", 0, 13), + macro_f_string_static_t_initialize_1("a:\"slash\\\\\\\\\\\\\"", 0, 15), + macro_f_string_static_t_initialize_1("a:\"slash\\\\\\\\\\\\\\\\\"", 0, 17), macro_f_string_static_t_initialize_1("iki:\"\"", 0, 6), macro_f_string_static_t_initialize_1("iki:\"b\"", 0, 7), macro_f_string_static_t_initialize_1("iki:\"content\"", 0, 13), @@ -726,6 +1046,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("iki:\"quote's\"", 0, 13), macro_f_string_static_t_initialize_1("iki:\"quote`s\"", 0, 13), macro_f_string_static_t_initialize_1("iki:\"quote\\\"s\"", 0, 14), + macro_f_string_static_t_initialize_1("iki:\"slash\\\\\"", 0, 13), + macro_f_string_static_t_initialize_1("iki:\"slash\\\\\\\\\"", 0, 15), + macro_f_string_static_t_initialize_1("iki:\"slash\\\\\\\\\\\\\"", 0, 17), + macro_f_string_static_t_initialize_1("iki:\"slash\\\\\\\\\\\\\\\\\"", 0, 19), macro_f_string_static_t_initialize_1("has_CHARS+-:\"\"", 0, 14), macro_f_string_static_t_initialize_1("has_CHARS+-:\"b\"", 0, 15), macro_f_string_static_t_initialize_1("has_CHARS+-:\"content\"", 0, 21), @@ -733,6 +1057,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("has_CHARS+-:\"quote's\"", 0, 21), macro_f_string_static_t_initialize_1("has_CHARS+-:\"quote`s\"", 0, 21), macro_f_string_static_t_initialize_1("has_CHARS+-:\"quote\\\"s\"", 0, 22), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"slash\\\\\"", 0, 21), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"slash\\\\\\\\\"", 0, 23), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"slash\\\\\\\\\\\\\"", 0, 25), + macro_f_string_static_t_initialize_1("has_CHARS+-:\"slash\\\\\\\\\\\\\\\\\"", 0, 27), macro_f_string_static_t_initialize_1("[a]:''", 0, 6), macro_f_string_static_t_initialize_1("[a]:'b'", 0, 7), macro_f_string_static_t_initialize_1("[a]:'content'", 0, 13), @@ -740,6 +1068,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("[a]:'quote\\'s'", 0, 14), macro_f_string_static_t_initialize_1("[a]:'quote`s'", 0, 13), macro_f_string_static_t_initialize_1("[a]:'quote\"s'", 0, 13), + macro_f_string_static_t_initialize_1("[a]:'slash\\\\'", 0, 13), + macro_f_string_static_t_initialize_1("[a]:'slash\\\\\\\\'", 0, 15), + macro_f_string_static_t_initialize_1("[a]:'slash\\\\\\\\\\\\'", 0, 17), + macro_f_string_static_t_initialize_1("[a]:'slash\\\\\\\\\\\\\\\\'", 0, 19), macro_f_string_static_t_initialize_1("[iki]:''", 0, 8), macro_f_string_static_t_initialize_1("[iki]:'b'", 0, 9), macro_f_string_static_t_initialize_1("[iki]:'content'", 0, 15), @@ -747,6 +1079,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("[iki]:'quote\\'s'", 0, 16), macro_f_string_static_t_initialize_1("[iki]:'quote`s'", 0, 15), macro_f_string_static_t_initialize_1("[iki]:'quote\"s'", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:'slash\\\\'", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:'slash\\\\\\\\'", 0, 17), + macro_f_string_static_t_initialize_1("[iki]:'slash\\\\\\\\\\\\'", 0, 19), + macro_f_string_static_t_initialize_1("[iki]:'slash\\\\\\\\\\\\\\\\'", 0, 21), macro_f_string_static_t_initialize_1("[has_CHARS+-]:''", 0, 16), macro_f_string_static_t_initialize_1("[has_CHARS+-]:'b'", 0, 17), macro_f_string_static_t_initialize_1("[has_CHARS+-]:'content'", 0, 23), @@ -754,6 +1090,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("[has_CHARS+-]:'quote\\'s'", 0, 24), macro_f_string_static_t_initialize_1("[has_CHARS+-]:'quote`s'", 0, 23), macro_f_string_static_t_initialize_1("[has_CHARS+-]:'quote\"s'", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'slash\\\\'", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'slash\\\\\\\\'", 0, 25), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'slash\\\\\\\\\\\\'", 0, 27), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:'slash\\\\\\\\\\\\\\\\'", 0, 29), macro_f_string_static_t_initialize_1("[a]:``", 0, 6), macro_f_string_static_t_initialize_1("[a]:`b`", 0, 7), macro_f_string_static_t_initialize_1("[a]:`content`", 0, 13), @@ -761,6 +1101,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("[a]:`quote's`", 0, 13), macro_f_string_static_t_initialize_1("[a]:`quote\\`s`", 0, 14), macro_f_string_static_t_initialize_1("[a]:`quote\"s`", 0, 13), + macro_f_string_static_t_initialize_1("[a]:`slash\\\\`", 0, 13), + macro_f_string_static_t_initialize_1("[a]:`slash\\\\\\\\`", 0, 15), + macro_f_string_static_t_initialize_1("[a]:`slash\\\\\\\\\\\\`", 0, 17), + macro_f_string_static_t_initialize_1("[a]:`slash\\\\\\\\\\\\\\\\`", 0, 19), macro_f_string_static_t_initialize_1("[iki]:``", 0, 8), macro_f_string_static_t_initialize_1("[iki]:`b`", 0, 9), macro_f_string_static_t_initialize_1("[iki]:`content`", 0, 15), @@ -768,6 +1112,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("[iki]:`quote's`", 0, 15), macro_f_string_static_t_initialize_1("[iki]:`quote\\`s`", 0, 16), macro_f_string_static_t_initialize_1("[iki]:`quote\"s`", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:`slash\\\\`", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:`slash\\\\\\\\`", 0, 17), + macro_f_string_static_t_initialize_1("[iki]:`slash\\\\\\\\\\\\`", 0, 19), + macro_f_string_static_t_initialize_1("[iki]:`slash\\\\\\\\\\\\\\\\`", 0, 21), macro_f_string_static_t_initialize_1("[has_CHARS+-]:``", 0, 16), macro_f_string_static_t_initialize_1("[has_CHARS+-]:`b`", 0, 17), macro_f_string_static_t_initialize_1("[has_CHARS+-]:`content`", 0, 23), @@ -775,6 +1123,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("[has_CHARS+-]:`quote's`", 0, 23), macro_f_string_static_t_initialize_1("[has_CHARS+-]:`quote\\`s`", 0, 24), macro_f_string_static_t_initialize_1("[has_CHARS+-]:`quote\"s`", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`slash\\\\`", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`slash\\\\\\\\`", 0, 25), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`slash\\\\\\\\\\\\`", 0, 27), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:`slash\\\\\\\\\\\\\\\\`", 0, 29), macro_f_string_static_t_initialize_1("[a]:\"\"", 0, 6), macro_f_string_static_t_initialize_1("[a]:\"b\"", 0, 7), macro_f_string_static_t_initialize_1("[a]:\"content\"", 0, 13), @@ -782,6 +1134,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("[a]:\"quote's\"", 0, 13), macro_f_string_static_t_initialize_1("[a]:\"quote`s\"", 0, 13), macro_f_string_static_t_initialize_1("[a]:\"quote\\\"s\"", 0, 14), + macro_f_string_static_t_initialize_1("[a]:\"slash\\\\\"", 0, 13), + macro_f_string_static_t_initialize_1("[a]:\"slash\\\\\\\\\"", 0, 15), + macro_f_string_static_t_initialize_1("[a]:\"slash\\\\\\\\\\\\\"", 0, 17), + macro_f_string_static_t_initialize_1("[a]:\"slash\\\\\\\\\\\\\\\\\"", 0, 19), macro_f_string_static_t_initialize_1("[iki]:\"\"", 0, 8), macro_f_string_static_t_initialize_1("[iki]:\"b\"", 0, 9), macro_f_string_static_t_initialize_1("[iki]:\"content\"", 0, 15), @@ -789,6 +1145,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("[iki]:\"quote's\"", 0, 15), macro_f_string_static_t_initialize_1("[iki]:\"quote`s\"", 0, 15), macro_f_string_static_t_initialize_1("[iki]:\"quote\\\"s\"", 0, 16), + macro_f_string_static_t_initialize_1("[iki]:\"slash\\\\\"", 0, 15), + macro_f_string_static_t_initialize_1("[iki]:\"slash\\\\\\\\\"", 0, 17), + macro_f_string_static_t_initialize_1("[iki]:\"slash\\\\\\\\\\\\\"", 0, 19), + macro_f_string_static_t_initialize_1("[iki]:\"slash\\\\\\\\\\\\\\\\\"", 0, 21), macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"\"", 0, 16), macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"b\"", 0, 17), macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"content\"", 0, 23), @@ -796,6 +1156,10 @@ void test__f_iki_write__works(void **state) { macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"quote's\"", 0, 23), macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"quote`s\"", 0, 23), macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"quote\\\"s\"", 0, 24), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"slash\\\\\"", 0, 23), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"slash\\\\\\\\\"", 0, 25), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"slash\\\\\\\\\\\\\"", 0, 27), + macro_f_string_static_t_initialize_1("[has_CHARS+-]:\"slash\\\\\\\\\\\\\\\\\"", 0, 29), }; const f_status_t statuss[] = { @@ -925,6 +1289,78 @@ void test__f_iki_write__works(void **state) { F_okay, F_okay, F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, + F_okay, }; for (uint8_t i = 0; i < _inline_macro_total_rows; ++i) { diff --git a/level_0/f_iki/tests/unit/c/test-iki.c b/level_0/f_iki/tests/unit/c/test-iki.c index 0b89212..2da0b22 100644 --- a/level_0/f_iki/tests/unit/c/test-iki.c +++ b/level_0/f_iki/tests/unit/c/test-iki.c @@ -53,6 +53,11 @@ int main(void) { cmocka_unit_test(test__f_iki_eki_read__returns_data_not_stop), cmocka_unit_test(test__f_iki_eki_read__works), + cmocka_unit_test(test__f_iki_eki_write__returns_data_not), + cmocka_unit_test(test__f_iki_eki_write__returns_syntax), + cmocka_unit_test(test__f_iki_eki_write__works), + cmocka_unit_test(test__f_iki_eki_write__works_for_multiple), + cmocka_unit_test(test__f_iki_ekis_delete_callback__fails), cmocka_unit_test(test__f_iki_ekis_destroy_callback__fails), cmocka_unit_test(test__f_iki_ekiss_destroy_callback__fails), @@ -112,6 +117,7 @@ int main(void) { // f_iki_ekiss_delete_callback() doesn't use parameter checking. cmocka_unit_test(test__f_iki_eki_read__parameter_checking), + cmocka_unit_test(test__f_iki_eki_write__parameter_checking), cmocka_unit_test(test__f_iki_ekis_append__parameter_checking), cmocka_unit_test(test__f_iki_ekis_append_all__parameter_checking), diff --git a/level_0/f_iki/tests/unit/c/test-iki.h b/level_0/f_iki/tests/unit/c/test-iki.h index 379bf88..53e5fe3 100644 --- a/level_0/f_iki/tests/unit/c/test-iki.h +++ b/level_0/f_iki/tests/unit/c/test-iki.h @@ -37,6 +37,7 @@ #include "test-iki-datass_delete_callback.h" #include "test-iki-datass_destroy_callback.h" #include "test-iki-eki_read.h" +#include "test-iki-eki_write.h" #include "test-iki-ekis_append.h" #include "test-iki-ekis_append_all.h" #include "test-iki-ekis_delete_callback.h"