chiark / gitweb /
debugging for thing that crashed
[innduct.git] / tests / lib / strerror-t.c
1 /* $Id: strerror-t.c 5559 2002-08-11 23:43:48Z rra $ */
2 /* strerror test suite. */
3
4 #include "config.h"
5 #include "clibrary.h"
6 #include <errno.h>
7
8 #include "libtest.h"
9
10 const char *test_strerror(int);
11
12 int
13 main(void)
14 {
15     puts("5");
16
17 #if HAVE_STRERROR
18     ok_string(1, strerror(EACCES), test_strerror(EACCES));
19     ok_string(2, strerror(0), test_strerror(0));
20 #else
21     ok(1, strerror(EACCES) != NULL);
22     ok(2, strerror(0) != NULL);
23 #endif
24     ok_string(3, "Error code 77777", test_strerror(77777));
25     ok_string(4, "Error code -4000", test_strerror(-4000));
26     ok_string(5, "Error code -100000", test_strerror(-100000));
27
28     return 0;
29 }