1 #include <stic.h> 2 3 #include <string.h> 4 5 #include "../../src/ui/column_view.h" 6 #include "../../src/viewcolumns_parser.h" 7 8 #include "test.h" 9 10 column_info_t info; 11 12 DEFINE_SUITE(); 13 14 static void add_column(columns_t * columns,column_info_t column_info)15add_column(columns_t *columns, column_info_t column_info) 16 { 17 info = column_info; 18 } 19 20 static int map_name(const char name[],void * arg)21map_name(const char name[], void *arg) 22 { 23 (void)arg; 24 return (strcmp(name, "name") == 0) ? 0 : -1; 25 } 26 27 int do_parse(const char * str)28do_parse(const char *str) 29 { 30 return parse_columns(NULL, add_column, map_name, str, NULL); 31 } 32 33 /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 noexpandtab cinoptions-=(0 : */ 34 /* vim: set cinoptions+=t0 filetype=c : */ 35