Start str8 renaming

This commit is contained in:
2026-06-26 16:02:12 +01:00
parent cd797683d2
commit acbfc9088c
34 changed files with 729 additions and 729 deletions
+22 -22
View File
@@ -5,11 +5,11 @@
#include <string.h>
WpTestFuncResult test_commander_cmd_success(void) {
Str8List cmd = wapp_dbl_list(Str8);
Str8 echo = wapp_str8_lit("echo");
Str8 msg = wapp_str8_lit("hello world");
wapp_dbl_list_push_back(Str8, &cmd, &echo);
wapp_dbl_list_push_back(Str8, &cmd, &msg);
WpStr8List cmd = wapp_dbl_list(WpStr8);
WpStr8 echo = wapp_str8_lit("echo");
WpStr8 msg = wapp_str8_lit("hello world");
wapp_dbl_list_push_back(WpStr8, &cmd, &echo);
wapp_dbl_list_push_back(WpStr8, &cmd, &msg);
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_DISCARD, nullptr, &cmd);
b8 succeeded = result.exited && result.exit_code == EXIT_SUCCESS &&
@@ -19,9 +19,9 @@ WpTestFuncResult test_commander_cmd_success(void) {
}
WpTestFuncResult test_commander_cmd_failure(void) {
Str8List cmd = wapp_dbl_list(Str8);
Str8 grep = wapp_str8_lit("grep");
wapp_dbl_list_push_back(Str8, &cmd, &grep);
WpStr8List cmd = wapp_dbl_list(WpStr8);
WpStr8 grep = wapp_str8_lit("grep");
wapp_dbl_list_push_back(WpStr8, &cmd, &grep);
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_DISCARD, nullptr, &cmd);
b8 failed = result.exited && result.exit_code != EXIT_SUCCESS &&
@@ -31,16 +31,16 @@ WpTestFuncResult test_commander_cmd_failure(void) {
}
WpTestFuncResult test_commander_cmd_out_buf_success(void) {
Str8 buf = wapp_str8_buf(64);
Str8 expected = wapp_str8_buf(64);
WpStr8 buf = wapp_str8_buf(64);
WpStr8 expected = wapp_str8_buf(64);
char msg[] = "hello world";
wapp_str8_copy_cstr_capped(&expected, msg);
Str8List cmd = wapp_dbl_list(Str8);
Str8 echo = wapp_str8_lit("echo");
Str8 arg = wapp_str8_lit(msg);
wapp_dbl_list_push_back(Str8, &cmd, &echo);
wapp_dbl_list_push_back(Str8, &cmd, &arg);
WpStr8List cmd = wapp_dbl_list(WpStr8);
WpStr8 echo = wapp_str8_lit("echo");
WpStr8 arg = wapp_str8_lit(msg);
wapp_dbl_list_push_back(WpStr8, &cmd, &echo);
wapp_dbl_list_push_back(WpStr8, &cmd, &arg);
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_CAPTURE, &buf, &cmd);
b8 succeeded = result.exited && result.exit_code == EXIT_SUCCESS &&
@@ -50,16 +50,16 @@ WpTestFuncResult test_commander_cmd_out_buf_success(void) {
}
WpTestFuncResult test_commander_cmd_out_buf_failure(void) {
Str8 buf = wapp_str8_buf(4);
Str8 expected = wapp_str8_buf(64);
WpStr8 buf = wapp_str8_buf(4);
WpStr8 expected = wapp_str8_buf(64);
char msg[] = "hello world";
wapp_str8_copy_cstr_capped(&expected, msg);
Str8List cmd = wapp_dbl_list(Str8);
Str8 echo = wapp_str8_lit("echo");
Str8 arg = wapp_str8_lit(msg);
wapp_dbl_list_push_back(Str8, &cmd, &echo);
wapp_dbl_list_push_back(Str8, &cmd, &arg);
WpStr8List cmd = wapp_dbl_list(WpStr8);
WpStr8 echo = wapp_str8_lit("echo");
WpStr8 arg = wapp_str8_lit(msg);
wapp_dbl_list_push_back(WpStr8, &cmd, &echo);
wapp_dbl_list_push_back(WpStr8, &cmd, &arg);
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_CAPTURE, &buf, &cmd);
b8 failed = !result.exited && result.exit_code != EXIT_SUCCESS &&