diff options
author | cvs2svn <admin@example.com> | 2012-07-13 17:49:56 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2012-07-13 17:49:56 +0000 |
commit | 6f82d0e8f9756938f04071892206a5af85e676f0 (patch) | |
tree | 821921a1dd0a5a3cece91121e121cc63c4b68128 /src/regress/lib/libc/stpncpy | |
parent | 9204e59073bcf27e1487ec4ac46e981902ddd904 (diff) | |
download | openbsd-eric_g2k12.tar.gz openbsd-eric_g2k12.tar.bz2 openbsd-eric_g2k12.zip |
This commit was manufactured by cvs2git to create tag 'eric_g2k12'.eric_g2k12
Diffstat (limited to 'src/regress/lib/libc/stpncpy')
-rw-r--r-- | src/regress/lib/libc/stpncpy/Makefile | 3 | ||||
-rw-r--r-- | src/regress/lib/libc/stpncpy/stpncpy_test.c | 24 |
2 files changed, 0 insertions, 27 deletions
diff --git a/src/regress/lib/libc/stpncpy/Makefile b/src/regress/lib/libc/stpncpy/Makefile deleted file mode 100644 index 9333934da6..0000000000 --- a/src/regress/lib/libc/stpncpy/Makefile +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | PROG=stpncpy_test | ||
2 | |||
3 | .include <bsd.regress.mk> | ||
diff --git a/src/regress/lib/libc/stpncpy/stpncpy_test.c b/src/regress/lib/libc/stpncpy/stpncpy_test.c deleted file mode 100644 index 63b7d25e53..0000000000 --- a/src/regress/lib/libc/stpncpy/stpncpy_test.c +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* $OpenBSD: stpncpy_test.c,v 1.1 2012/07/11 10:46:23 naddy Exp $ */ | ||
2 | |||
3 | /* | ||
4 | * Public domain, 2012, Christian Weisgerber <naddy@openbsd.org> | ||
5 | */ | ||
6 | |||
7 | #include <string.h> | ||
8 | |||
9 | int main(void) | ||
10 | { | ||
11 | char dst[8]; | ||
12 | char *src = "abcdef"; | ||
13 | |||
14 | if (stpncpy(dst, src, 5) != dst + 5) | ||
15 | return 1; | ||
16 | if (stpncpy(dst, src, 6) != dst + 6) | ||
17 | return 1; | ||
18 | if (stpncpy(dst, src, 7) != dst + 6) | ||
19 | return 1; | ||
20 | if (stpncpy(dst, src, 8) != dst + 6) | ||
21 | return 1; | ||
22 | |||
23 | return 0; | ||
24 | } | ||