diff options
| author | jvoisin | 2023-06-22 17:58:58 +0200 |
|---|---|---|
| committer | jvoisin | 2023-06-22 17:58:58 +0200 |
| commit | af7480d0190cb5dcf279a7ddfab320ff084a3471 (patch) | |
| tree | 3ba3190adb08bd5d3a4671358c5ae4c3c13f3ab2 /tests/test_stpcpy_static_write.c | |
| parent | cb1ce9e1815a492de0f13c2b046b8472024b9f6d (diff) | |
Add tests for stpcpy
Diffstat (limited to 'tests/test_stpcpy_static_write.c')
| -rw-r--r-- | tests/test_stpcpy_static_write.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_stpcpy_static_write.c b/tests/test_stpcpy_static_write.c new file mode 100644 index 0000000..4aa4aee --- /dev/null +++ b/tests/test_stpcpy_static_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 | strcpy(buffer, "1234567"); | ||
| 8 | puts(buffer); | ||
| 9 | |||
| 10 | CHK_FAIL_START | ||
| 11 | stpcpy(buffer, "1234567890"); | ||
| 12 | CHK_FAIL_END | ||
| 13 | |||
| 14 | puts(buffer); | ||
| 15 | return ret; | ||
| 16 | } | ||
