diff options
Diffstat (limited to 'regress/lib/libc/vis/vis_test.c')
-rw-r--r-- | regress/lib/libc/vis/vis_test.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/regress/lib/libc/vis/vis_test.c b/regress/lib/libc/vis/vis_test.c new file mode 100644 index 00000000000..40e5d9f5032 --- /dev/null +++ b/regress/lib/libc/vis/vis_test.c @@ -0,0 +1,23 @@ +/* $OpenBSD */ + +/* Public domain. 2005, Otto Moerbeek */ + +#include <limits.h> +#include <stdlib.h> +#include <stdio.h> +#include <vis.h> + +int +main() +{ + char inp[UCHAR_MAX + 1]; + char out[4 * UCHAR_MAX + 1]; + int i; + + for (i = 0; i <= UCHAR_MAX; i++) { + inp[i] = i; + } + strvisx(out, inp, UCHAR_MAX + 1, 0); + printf("%s\n", out); + exit(0); +} |