diff options
Diffstat (limited to 'test/fopen_mkdir-test.c')
-rw-r--r-- | test/fopen_mkdir-test.c | 14 |
1 files changed, 14 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; +} |