diff options
Diffstat (limited to 'tests/test_relocation.c')
| -rw-r--r-- | tests/test_relocation.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_relocation.c b/tests/test_relocation.c index a6c33f2..69142dc 100644 --- a/tests/test_relocation.c +++ b/tests/test_relocation.c @@ -14,9 +14,12 @@ void test_replace_text() { const char *target = targets[i]; const char *expected = targets[i + 1]; char input[BUFSIZ] = {0}; - strcpy(input, test_string); + strncpy(input, test_string, sizeof(input) - 1); + printf("input: %s\n", input); + printf("target: %s\n", target); STASIS_ASSERT(replace_text(input, target, "^^^", 0) == 0, "string replacement failed"); + printf("result: %s\n\n", input); STASIS_ASSERT(strcmp(input, expected) == 0, "unexpected replacement"); } |
