summaryrefslogtreecommitdiffstats
path: root/test/randstring-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/randstring-test.c')
-rw-r--r--test/randstring-test.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/randstring-test.c b/test/randstring-test.c
new file mode 100644
index 0000000..644a0d9
--- /dev/null
+++ b/test/randstring-test.c
@@ -0,0 +1,12 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include "randstring.c"
+
+extern int main(int argc, char* argv[]) {
+ if(argc != 2) {
+ printf("usage: %s length\n", argv[0]);
+ return 1;
+ }
+ printf("generated string:\n%s\n", randstring(atoi(argv[1])));
+ return 0;
+}