diff options
| author | jvoisin | 2023-09-17 15:12:47 +0200 |
|---|---|---|
| committer | jvoisin | 2023-09-17 15:13:22 +0200 |
| commit | 09b5fc1fd8fefe672fa1bb3ef63cb43e0f5f5476 (patch) | |
| tree | dcf978a3c9004d6167c5bc8d5c9c5d590425eea4 /tests/test_stpcpy_dynamic_write.c | |
| parent | b2c20e6c16278fe556ce4c4ff7d3b146b3a8f009 (diff) | |
Add a test for stpcpy
Diffstat (limited to 'tests/test_stpcpy_dynamic_write.c')
| -rw-r--r-- | tests/test_stpcpy_dynamic_write.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_stpcpy_dynamic_write.c b/tests/test_stpcpy_dynamic_write.c new file mode 100644 index 0000000..0cacda7 --- /dev/null +++ b/tests/test_stpcpy_dynamic_write.c | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #include "common.h" | ||
| 2 | |||
| 3 | #include <string.h> | ||
| 4 | |||
| 5 | int main(int argc, char** argv) { | ||
| 6 | char buffer[8] = {0}; | ||
| 7 | stpcpy(buffer, "1234567"); | ||
| 8 | puts(buffer); | ||
| 9 | |||
| 10 | CHK_FAIL_START | ||
| 11 | stpcpy(buffer, argv[1]); | ||
| 12 | CHK_FAIL_END | ||
| 13 | |||
| 14 | puts(buffer); | ||
| 15 | return ret; | ||
| 16 | } | ||
