summaryrefslogtreecommitdiff
path: root/tests/test_bcopy_static_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_bcopy_static_write.c')
-rw-r--r--tests/test_bcopy_static_write.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/test_bcopy_static_write.c b/tests/test_bcopy_static_write.c
new file mode 100644
index 0000000..47e737a
--- /dev/null
+++ b/tests/test_bcopy_static_write.c
@@ -0,0 +1,18 @@
1#define _GNU_SOURCE
2
3#include "common.h"
4
5#include <string.h>
6
7int main(int argc, char** argv) {
8 char buffer[8] = {0};
9 bcopy("1234567890", buffer, sizeof(buffer) - 1);
10 puts(buffer);
11
12 CHK_FAIL_START
13 bcopy("1234567890", buffer, sizeof(buffer) + 1);
14 CHK_FAIL_END
15
16 puts(buffer);
17 return ret;
18}