diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/fopen_mkdir-test.c | 14 | ||||
-rw-r--r-- | test/jsbundle-test.c | 12 | ||||
-rw-r--r-- | test/mkdirp-test.c | 12 |
3 files changed, 38 insertions, 0 deletions
diff --git a/test/fopen_mkdir-test.c b/test/fopen_mkdir-test.c new file mode 100644 index 0000000..9a2acfc --- /dev/null +++ b/test/fopen_mkdir-test.c @@ -0,0 +1,14 @@ +#include <stdlib.h> +#include <stdio.h> +#include "fopenmkdir.c" + +extern int main(int argc, char* argv[]) { + if(argc != 3) { + printf("usage: %s file_to_write string_to_write\n", argv[0]); + return 1; + } + FILE * test_file; + test_file = fopen_mkdir(argv[1], "w"); + fprintf(test_file, "%s\n", argv[2]); + return 0; +} diff --git a/test/jsbundle-test.c b/test/jsbundle-test.c new file mode 100644 index 0000000..b63a0fd --- /dev/null +++ b/test/jsbundle-test.c @@ -0,0 +1,12 @@ +#include <stdlib.h> +#include <stdio.h> +#include "jsbundle.c" + +extern int main(int argc, char* argv[]) { + if(argc != 4) { + printf("usage: %s bundle.js source_directory/ .js\n", argv[0]); + return 1; + } + bundle_js(argv[1], argv[2], argv[3]); + return 0; +} diff --git a/test/mkdirp-test.c b/test/mkdirp-test.c new file mode 100644 index 0000000..d1bcd95 --- /dev/null +++ b/test/mkdirp-test.c @@ -0,0 +1,12 @@ +#include <stdlib.h> +#include <stdio.h> +#include "mkdirp.c" + +extern int main(int argc, char* argv[]) { + if(argc != 2) { + printf("usage: %s directory\n", argv[0]); + return 1; + } + mkdir_p(argv[1]); + return 0; +} |