diff options
author | espie <> | 2004-04-30 17:15:12 +0000 |
---|---|---|
committer | espie <> | 2004-04-30 17:15:12 +0000 |
commit | a4f10b37035e781770724661a37a45a83b65c25f (patch) | |
tree | 6a61d7d91122d65d5385f9cc2fabd4ad8758be91 /src/regress/lib/libc/strerror/strerror_test.c | |
parent | 0a296eded866d7ff51a920ebce2ab8399cf97cf3 (diff) | |
download | openbsd-a4f10b37035e781770724661a37a45a83b65c25f.tar.gz openbsd-a4f10b37035e781770724661a37a45a83b65c25f.tar.bz2 openbsd-a4f10b37035e781770724661a37a45a83b65c25f.zip |
Add tests for strerror.
Diffstat (limited to 'src/regress/lib/libc/strerror/strerror_test.c')
-rw-r--r-- | src/regress/lib/libc/strerror/strerror_test.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/regress/lib/libc/strerror/strerror_test.c b/src/regress/lib/libc/strerror/strerror_test.c new file mode 100644 index 0000000000..5b74df3a6a --- /dev/null +++ b/src/regress/lib/libc/strerror/strerror_test.c | |||
@@ -0,0 +1,28 @@ | |||
1 | /* $OpenBSD: strerror_test.c,v 1.1 2004/04/30 17:15:12 espie Exp $ */ | ||
2 | /* | ||
3 | * Copyright (c) 2004 Marc Espie <espie@cvs.openbsd.org> | ||
4 | * | ||
5 | * Permission to use, copy, modify, and distribute this software for any | ||
6 | * purpose with or without fee is hereby granted, provided that the above | ||
7 | * copyright notice and this permission notice appear in all copies. | ||
8 | * | ||
9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | */ | ||
17 | #include <string.h> | ||
18 | #include <stdio.h> | ||
19 | #include <limits.h> | ||
20 | int main() | ||
21 | { | ||
22 | printf("%s\n", strerror(21345)); | ||
23 | printf("%s\n", strerror(-21345)); | ||
24 | printf("%s\n", strerror(0)); | ||
25 | printf("%s\n", strerror(INT_MAX)); | ||
26 | printf("%s\n", strerror(INT_MIN)); | ||
27 | return 0; | ||
28 | } | ||