--- /dev/null
+#include "test-iki.h"
+#include "test-iki-write.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void test__f_iki_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_static_t vocabulary = macro_f_string_static_t_initialize_1("vocabulary", 0, 10);
+ const f_string_static_t content = macro_f_string_static_t_initialize_1("content", 0, 7);
+
+ state_data.status = F_known_not;
+
+ {
+ f_iki_write(vocabulary, 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_write(vocabulary, 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_write(vocabulary, 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_write(vocabulary, content, f_iki_syntax_quote_double_s, 0, &state_data);
+
+ assert_int_equal(state_data.status, F_status_set_error(F_parameter));
+ }
+
+ {
+ f_iki_write(vocabulary, content, empty, &destination, &state_data);
+
+ assert_int_equal(state_data.status, F_status_set_error(F_parameter));
+ }
+
+ {
+ f_iki_write(vocabulary, content, content, &destination, &state_data);
+
+ assert_int_equal(state_data.status, F_status_set_error(F_parameter));
+ }
+}
+
+void test__f_iki_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;
+ 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_static_t content = macro_f_string_static_t_initialize_1("content", 0, 7);
+
+ {
+ f_iki_write(empty, 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_write(empty, 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_write(empty, 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_write__returns_syntax(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 content = macro_f_string_static_t_initialize_1("content", 0, 7);
+ const f_string_static_t str_colon = macro_f_string_static_t_initialize_1(":", 0, 1);
+ const f_string_static_t str_space = macro_f_string_static_t_initialize_1(" ", 0, 1);
+ const f_string_static_t str_at = macro_f_string_static_t_initialize_1("@", 0, 1);
+ const f_string_static_t str_bracket_open = macro_f_string_static_t_initialize_1("[", 0, 1);
+ const f_string_static_t str_bracket_close = macro_f_string_static_t_initialize_1("]", 0, 1);
+ const f_string_static_t str_lots = macro_f_string_static_t_initialize_1("This * is [never] going && to be...>%'`\" valid!", 0, 47);
+
+ {
+ f_iki_write(str_colon, content, f_iki_syntax_quote_double_s, &destination, &state_data);
+
+ assert_int_equal(F_status_set_fine(state_data.status), F_syntax);
+ }
+
+ {
+ f_iki_write(str_space, content, f_iki_syntax_quote_double_s, &destination, &state_data);
+
+ assert_int_equal(F_status_set_fine(state_data.status), F_syntax);
+ }
+
+ {
+ f_iki_write(str_at, content, f_iki_syntax_quote_double_s, &destination, &state_data);
+
+ assert_int_equal(F_status_set_fine(state_data.status), F_syntax);
+ }
+
+ {
+ f_iki_write(str_bracket_open, content, f_iki_syntax_quote_double_s, &destination, &state_data);
+
+ assert_int_equal(F_status_set_fine(state_data.status), F_syntax);
+ }
+
+ {
+ f_iki_write(str_bracket_close, content, f_iki_syntax_quote_double_s, &destination, &state_data);
+
+ assert_int_equal(F_status_set_fine(state_data.status), F_syntax);
+ }
+
+ {
+ f_iki_write(str_lots, 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_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_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_quote_double = macro_f_string_static_t_initialize_1("quote\"s", 0, 7);
+
+ #define _inline_macro_total_rows 126
+
+ f_string_static_t vocabularys[] = {
+ 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,
+ str_iki,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ 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,
+ str_iki,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ 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,
+ str_iki,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ 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,
+ str_iki,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ 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,
+ str_iki,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ 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,
+ str_iki,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ str_has,
+ };
+
+ f_string_static_t contents[] = {
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_single,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_single,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_single,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_grave,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_grave,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_grave,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_double,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_double,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_double,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_single,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_single,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_single,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_grave,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_grave,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_grave,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_double,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_double,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ empty,
+ str_b,
+ str_content,
+ str_content_quote_double,
+ str_quote_single,
+ str_quote_grave,
+ str_quote_double,
+ };
+
+ 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_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_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_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,
+ 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("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("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("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("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("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("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("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("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("[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("[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("[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("[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("[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("[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("[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("[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("[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),
+ };
+
+ 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,
+ };
+
+ for (uint8_t i = 0; i < _inline_macro_total_rows; ++i) {
+
+ state_data.flag = flags[i];
+ destination.used = 0;
+
+ f_iki_write(vocabularys[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