Start str8 renaming
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
#include <string.h>
|
||||
|
||||
WpTestFuncResult test_commander_cmd_success(void) {
|
||||
Str8List cmd = wapp_dbl_list(Str8);
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_lit("echo"));
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_lit("hello world"));
|
||||
WpStr8List cmd = wapp_dbl_list(WpStr8);
|
||||
wapp_dbl_list_push_back(WpStr8, &cmd, &wapp_str8_lit("echo"));
|
||||
wapp_dbl_list_push_back(WpStr8, &cmd, &wapp_str8_lit("hello world"));
|
||||
|
||||
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_DISCARD, NULL, &cmd);
|
||||
b8 succeeded = result.exited && result.exit_code == EXIT_SUCCESS &&
|
||||
@@ -17,8 +17,8 @@ WpTestFuncResult test_commander_cmd_success(void) {
|
||||
}
|
||||
|
||||
WpTestFuncResult test_commander_cmd_failure(void) {
|
||||
Str8List cmd = wapp_dbl_list(Str8);
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_lit("grep"));
|
||||
WpStr8List cmd = wapp_dbl_list(WpStr8);
|
||||
wapp_dbl_list_push_back(WpStr8, &cmd, &wapp_str8_lit("grep"));
|
||||
|
||||
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_DISCARD, NULL, &cmd);
|
||||
b8 failed = result.exited && result.exit_code != EXIT_SUCCESS &&
|
||||
@@ -28,14 +28,14 @@ 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);
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_lit("echo"));
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_lit(msg));
|
||||
WpStr8List cmd = wapp_dbl_list(WpStr8);
|
||||
wapp_dbl_list_push_back(WpStr8, &cmd, &wapp_str8_lit("echo"));
|
||||
wapp_dbl_list_push_back(WpStr8, &cmd, &wapp_str8_lit(msg));
|
||||
|
||||
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_CAPTURE, &buf, &cmd);
|
||||
b8 succeeded = result.exited && result.exit_code == EXIT_SUCCESS &&
|
||||
@@ -45,14 +45,14 @@ 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);
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_lit("echo"));
|
||||
wapp_dbl_list_push_back(Str8, &cmd, &wapp_str8_lit(msg));
|
||||
WpStr8List cmd = wapp_dbl_list(WpStr8);
|
||||
wapp_dbl_list_push_back(WpStr8, &cmd, &wapp_str8_lit("echo"));
|
||||
wapp_dbl_list_push_back(WpStr8, &cmd, &wapp_str8_lit(msg));
|
||||
|
||||
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_CAPTURE, &buf, &cmd);
|
||||
b8 failed = !result.exited && result.exit_code != EXIT_SUCCESS &&
|
||||
|
||||
Reference in New Issue
Block a user