[F] Fixed buf
This commit is contained in:
@@ -3,6 +3,29 @@
|
||||
#include <wchar.h>
|
||||
#include "fort.h"
|
||||
|
||||
#ifdef FT_HAVE_WCHAR
|
||||
void test_bug_fixes(void)
|
||||
{
|
||||
SCENARIO("Bug 1") {
|
||||
ft_table_t *table = ft_create_table();
|
||||
|
||||
ft_table_t *table_tmp_1 = ft_create_table();
|
||||
|
||||
// ft_set_border_style(table_tmp_1, FT_EMPTY_STYLE);
|
||||
ft_set_cell_prop(table_tmp_1, 0, FT_ANY_COLUMN, FT_CPROP_ROW_TYPE, FT_ROW_HEADER);
|
||||
ft_wwrite_ln(table_tmp_1, L"Rank", L"Title", L"Year", L"Rating");
|
||||
ft_wwrite_ln(table_tmp_1, L"1", L"The Shawshank Redemption", L"3");
|
||||
|
||||
const wchar_t *str = ft_to_wstring(table_tmp_1);
|
||||
(void)str;
|
||||
ft_wprintf_ln(table, str);
|
||||
|
||||
ft_destroy_table(table_tmp_1);
|
||||
ft_destroy_table(table);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void test_table_basic(void)
|
||||
{
|
||||
ft_table_t *table = NULL;
|
||||
|
@@ -3,6 +3,9 @@
|
||||
#include "fort.h"
|
||||
|
||||
/* Test cases */
|
||||
#ifdef FT_HAVE_WCHAR
|
||||
void test_bug_fixes(void);
|
||||
#endif
|
||||
void test_vector_basic(void);
|
||||
void test_vector_stress(void);
|
||||
void test_string_buffer(void);
|
||||
@@ -35,6 +38,9 @@ struct test_case wb_test_suit [] = {
|
||||
|
||||
|
||||
struct test_case bb_test_suit [] = {
|
||||
#ifdef FT_HAVE_WCHAR
|
||||
{"test_bug_fixes", test_bug_fixes},
|
||||
#endif
|
||||
{"test_table_basic", test_table_basic},
|
||||
#ifdef FT_HAVE_WCHAR
|
||||
{"test_wcs_table_boundaries", test_wcs_table_boundaries},
|
||||
|
@@ -13,7 +13,7 @@ fort_status_t str_n_substring(const char *str, char ch_separator, size_t n, cons
|
||||
void wstr_n_substring(const wchar_t *str, wchar_t ch_separator, size_t n, const wchar_t **begin, const wchar_t **end);
|
||||
|
||||
|
||||
size_t buffer_text_width(string_buffer_t *buffer);
|
||||
//size_t buffer_text_width(string_buffer_t *buffer);
|
||||
|
||||
|
||||
void test_strchr_count(void);
|
||||
|
Reference in New Issue
Block a user