[R] Table printing refactoring

This commit is contained in:
seleznevae
2018-01-05 23:38:11 +03:00
parent a2c793cda2
commit 6dc77bd5a1
3 changed files with 84 additions and 12 deletions

View File

@@ -390,7 +390,6 @@ void test_table_options(void **state)
ft_destroy_table(table);
}
WHEN("Empty string has 0 heigt") {
fort_table_options_t table_options;
memcpy(&table_options, &def_options, sizeof(fort_table_options_t));
@@ -432,12 +431,12 @@ void test_table_options(void **state)
ft_destroy_table(table);
}
WHEN("Changing cell separators") {
fort_table_options_t table_options;
memcpy(&table_options, &def_options, sizeof(fort_table_options_t));
table_options.hor_separator = '|';
table_options.ver_separator = '=';
table_options.header_hor_separator = '*';
ft_set_default_options(&table_options);
@@ -447,11 +446,11 @@ void test_table_options(void **state)
char *table_str = ft_to_string(table);
assert_true( table_str != NULL );
const char *table_str_etalon =
"|||||||||||||||||||\n"
"*******************\n"
"= = = = =\n"
"= 3 = 4 = 55 = 67 =\n"
"= = = = =\n"
"|||||||||||||||||||\n"
"*******************\n"
"= = = = =\n"
"= 3 = 4 = 55 = 67 =\n"
"= = = = =\n"