summaryrefslogtreecommitdiffstats
path: root/testutil/strerror-all.c
diff options
context:
space:
mode:
Diffstat (limited to 'testutil/strerror-all.c')
-rw-r--r--testutil/strerror-all.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/testutil/strerror-all.c b/testutil/strerror-all.c
new file mode 100644
index 0000000..b875392
--- /dev/null
+++ b/testutil/strerror-all.c
@@ -0,0 +1,25 @@
+/* See LICENSE file for copyright and license details. */
+#include "../libsyscalls.h"
+
+#include <stddef.h>
+#include <stdio.h>
+
+
+int
+main(void)
+{
+ size_t i, count;
+
+#define X(...) 1
+ count = (LIBSYSCALLS_LIST_ERRORS(X, +));
+#undef X
+
+ for (i = 0; i < count; i++)
+ printf("%s\n", libsyscalls_strerror((enum libsyscalls_error)i));
+
+ if (fflush(stdout) || fclose(stdout)) {
+ perror(NULL);
+ return 1;
+ }
+ return 0;
+}