Remove codegen and implement dbl_list as generic container
This commit is contained in:
@@ -6,9 +6,9 @@
|
||||
#include <string.h>
|
||||
|
||||
TestFuncResult test_commander_cmd_success(void) {
|
||||
Str8List cmd = {0};
|
||||
wapp_str8_list_push_back(&cmd, &wapp_str8_node_from_cstr("echo"));
|
||||
wapp_str8_list_push_back(&cmd, &wapp_str8_node_from_cstr("hello world"));
|
||||
DBL_LIST(Str8) cmd = {0};
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_node_from_cstr("echo"));
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_node_from_cstr("hello world"));
|
||||
|
||||
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_DISCARD, NULL, &cmd);
|
||||
bool succeeded = result.exited && result.exit_code == EXIT_SUCCESS &&
|
||||
@@ -18,8 +18,8 @@ TestFuncResult test_commander_cmd_success(void) {
|
||||
}
|
||||
|
||||
TestFuncResult test_commander_cmd_failure(void) {
|
||||
Str8List cmd = {0};
|
||||
wapp_str8_list_push_back(&cmd, &wapp_str8_node_from_cstr("grep"));
|
||||
DBL_LIST(Str8) cmd = {0};
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_node_from_cstr("grep"));
|
||||
|
||||
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_DISCARD, NULL, &cmd);
|
||||
bool failed = result.exited && result.exit_code != EXIT_SUCCESS &&
|
||||
@@ -34,9 +34,9 @@ TestFuncResult test_commander_cmd_out_buf_success(void) {
|
||||
char msg[] = "hello world";
|
||||
wapp_str8_copy_cstr_capped(&expected, msg);
|
||||
|
||||
Str8List cmd = {0};
|
||||
wapp_str8_list_push_back(&cmd, &wapp_str8_node_from_cstr("echo"));
|
||||
wapp_str8_list_push_back(&cmd, &wapp_str8_node_from_cstr(msg));
|
||||
DBL_LIST(Str8) cmd = {0};
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_node_from_cstr("echo"));
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_node_from_cstr(msg));
|
||||
|
||||
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_CAPTURE, &buf, &cmd);
|
||||
bool succeeded = result.exited && result.exit_code == EXIT_SUCCESS &&
|
||||
@@ -51,9 +51,9 @@ TestFuncResult test_commander_cmd_out_buf_failure(void) {
|
||||
char msg[] = "hello world";
|
||||
wapp_str8_copy_cstr_capped(&expected, msg);
|
||||
|
||||
Str8List cmd = {0};
|
||||
wapp_str8_list_push_back(&cmd, &wapp_str8_node_from_cstr("echo"));
|
||||
wapp_str8_list_push_back(&cmd, &wapp_str8_node_from_cstr(msg));
|
||||
DBL_LIST(Str8) cmd = {0};
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_node_from_cstr("echo"));
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_node_from_cstr(msg));
|
||||
|
||||
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_CAPTURE, &buf, &cmd);
|
||||
bool failed = !result.exited && result.exit_code != EXIT_SUCCESS &&
|
||||
|
||||
Reference in New Issue
Block a user