revamp-strings (#1)

Co-authored-by: Abdelrahman Said <said.abdelrahman@flawlessai.com>
Reviewed-on: #1
Co-authored-by: Abdelrahman <said.abdelrahman89@gmail.com>
Co-committed-by: Abdelrahman <said.abdelrahman89@gmail.com>
This commit is contained in:
2024-10-07 22:35:56 +00:00
committed by Abdelrahman Said
parent 40d301fd95
commit 685682e1c8
10 changed files with 94 additions and 303 deletions

View File

@@ -27,7 +27,7 @@ TestFuncResult test_commander_cmd_out_buf_success(void) {
char expected_output[64] = {0};
const char *msg = "hello world";
u64 length = strlen(msg);
sprintf(expected_output, "%s\n", msg);
snprintf(expected_output, length + 2, "%s\n", msg);
CMDResult result = wapp_shell_commander_execute(SHELL_OUTPUT_CAPTURE, buf, 64, "echo", msg);
bool succeeded = result.exited && result.exit_code == EXIT_SUCCESS &&