summaryrefslogtreecommitdiff
path: root/tests/test_strlcat_static_write.c
diff options
context:
space:
mode:
authorjvoisin2023-09-17 16:02:08 +0200
committerjvoisin2023-09-17 16:02:08 +0200
commit267d5dbe4f79b8ebff8588700b2a8c0d1e56fc97 (patch)
tree0932aa51a0842ed3393e1d5610c285fd47a07300 /tests/test_strlcat_static_write.c
parent1122a7b8d9ab1c6ea030fac11495fc75aae07d42 (diff)
Add more dynamic tests
Diffstat (limited to 'tests/test_strlcat_static_write.c')
-rw-r--r--tests/test_strlcat_static_write.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_strlcat_static_write.c b/tests/test_strlcat_static_write.c
new file mode 100644
index 0000000..7ec70fe
--- /dev/null
+++ b/tests/test_strlcat_static_write.c
@@ -0,0 +1,19 @@
1#define _GNU_SOURCE
2#define _BSD_SOURCE
3
4#include "common.h"
5
6#include <string.h>
7
8int main(int argc, char** argv) {
9 char buffer[8] = {0};
10 strlcat(buffer, "1234567", sizeof(buffer));
11 puts(buffer);
12
13 CHK_FAIL_START
14 strlcat(buffer, "1234567890", 10);
15 CHK_FAIL_END
16
17 puts(buffer);
18 return ret;
19}