Rename dbl list

This commit is contained in:
2026-06-26 17:11:27 +01:00
parent 1a0a5b5192
commit f0e9da26bd
8 changed files with 260 additions and 260 deletions
+15 -15
View File
@@ -5,11 +5,11 @@
#include <string.h>
WpTestFuncResult test_commander_cmd_success(void) {
WpStr8List cmd = wapp_dbl_list(WpStr8);
wapp_dbl_list_push_back(WpStr8, &cmd, &wpStr8Lit("echo"));
wapp_dbl_list_push_back(WpStr8, &cmd, &wpStr8Lit("hello world"));
WpStr8List cmd = wpDblList(WpStr8);
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit("echo"));
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit("hello world"));
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_DISCARD, NULL, &cmd);
WpCmdResult result = wpShellCommanderExecute(SHELL_OUTPUT_DISCARD, NULL, &cmd);
b8 succeeded = result.exited && result.exit_code == EXIT_SUCCESS &&
result.error == SHELL_ERR_NO_ERROR;
@@ -17,10 +17,10 @@ WpTestFuncResult test_commander_cmd_success(void) {
}
WpTestFuncResult test_commander_cmd_failure(void) {
WpStr8List cmd = wapp_dbl_list(WpStr8);
wapp_dbl_list_push_back(WpStr8, &cmd, &wpStr8Lit("grep"));
WpStr8List cmd = wpDblList(WpStr8);
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit("grep"));
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_DISCARD, NULL, &cmd);
WpCmdResult result = wpShellCommanderExecute(SHELL_OUTPUT_DISCARD, NULL, &cmd);
b8 failed = result.exited && result.exit_code != EXIT_SUCCESS &&
result.error == SHELL_ERR_NO_ERROR;
@@ -33,11 +33,11 @@ WpTestFuncResult test_commander_cmd_out_buf_success(void) {
char msg[] = "hello world";
wpStr8CopyCstrCapped(&expected, msg);
WpStr8List cmd = wapp_dbl_list(WpStr8);
wapp_dbl_list_push_back(WpStr8, &cmd, &wpStr8Lit("echo"));
wapp_dbl_list_push_back(WpStr8, &cmd, &wpStr8Lit(msg));
WpStr8List cmd = wpDblList(WpStr8);
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit("echo"));
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit(msg));
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_CAPTURE, &buf, &cmd);
WpCmdResult result = wpShellCommanderExecute(SHELL_OUTPUT_CAPTURE, &buf, &cmd);
b8 succeeded = result.exited && result.exit_code == EXIT_SUCCESS &&
result.error == SHELL_ERR_NO_ERROR && wpStr8EqualToCount(&buf, &expected, strlen(msg));
@@ -50,11 +50,11 @@ WpTestFuncResult test_commander_cmd_out_buf_failure(void) {
char msg[] = "hello world";
wpStr8CopyCstrCapped(&expected, msg);
WpStr8List cmd = wapp_dbl_list(WpStr8);
wapp_dbl_list_push_back(WpStr8, &cmd, &wpStr8Lit("echo"));
wapp_dbl_list_push_back(WpStr8, &cmd, &wpStr8Lit(msg));
WpStr8List cmd = wpDblList(WpStr8);
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit("echo"));
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit(msg));
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_CAPTURE, &buf, &cmd);
WpCmdResult result = wpShellCommanderExecute(SHELL_OUTPUT_CAPTURE, &buf, &cmd);
b8 failed = !result.exited && result.exit_code != EXIT_SUCCESS &&
result.error == SHELL_ERR_OUT_BUF_FULL && !wpStr8Equal(&buf, &expected);