Rename shell commander

This commit is contained in:
2026-06-26 17:39:05 +01:00
parent e3856cf584
commit 1fc93fac24
7 changed files with 74 additions and 74 deletions
+8 -8
View File
@@ -9,9 +9,9 @@ WpTestFuncResult test_commander_cmd_success(void) {
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit("echo"));
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit("hello world"));
WpCmdResult result = wpShellCommanderExecute(SHELL_OUTPUT_DISCARD, NULL, &cmd);
WpCmdResult result = wpShellCommanderExecute(WP_SHELL_OUTPUT_DISCARD, NULL, &cmd);
b8 succeeded = result.exited && result.exit_code == EXIT_SUCCESS &&
result.error == SHELL_ERR_NO_ERROR;
result.error == WP_SHELL_ERR_NO_ERROR;
return wpTesterResult(succeeded);
}
@@ -20,9 +20,9 @@ WpTestFuncResult test_commander_cmd_failure(void) {
WpStr8List cmd = wpDblList(WpStr8);
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit("grep"));
WpCmdResult result = wpShellCommanderExecute(SHELL_OUTPUT_DISCARD, NULL, &cmd);
WpCmdResult result = wpShellCommanderExecute(WP_SHELL_OUTPUT_DISCARD, NULL, &cmd);
b8 failed = result.exited && result.exit_code != EXIT_SUCCESS &&
result.error == SHELL_ERR_NO_ERROR;
result.error == WP_SHELL_ERR_NO_ERROR;
return wpTesterResult(failed);
}
@@ -37,9 +37,9 @@ WpTestFuncResult test_commander_cmd_out_buf_success(void) {
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit("echo"));
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit(msg));
WpCmdResult result = wpShellCommanderExecute(SHELL_OUTPUT_CAPTURE, &buf, &cmd);
WpCmdResult result = wpShellCommanderExecute(WP_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));
result.error == WP_SHELL_ERR_NO_ERROR && wpStr8EqualToCount(&buf, &expected, strlen(msg));
return wpTesterResult(succeeded);
}
@@ -54,9 +54,9 @@ WpTestFuncResult test_commander_cmd_out_buf_failure(void) {
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit("echo"));
wpDblListPushBack(WpStr8, &cmd, &wpStr8Lit(msg));
WpCmdResult result = wpShellCommanderExecute(SHELL_OUTPUT_CAPTURE, &buf, &cmd);
WpCmdResult result = wpShellCommanderExecute(WP_SHELL_OUTPUT_CAPTURE, &buf, &cmd);
b8 failed = !result.exited && result.exit_code != EXIT_SUCCESS &&
result.error == SHELL_ERR_OUT_BUF_FULL && !wpStr8Equal(&buf, &expected);
result.error == WP_SHELL_ERR_OUT_BUF_FULL && !wpStr8Equal(&buf, &expected);
return wpTesterResult(failed);
}