summaryrefslogtreecommitdiffstats
path: root/test/fopen_mkdir-test.c
diff options
context:
space:
mode:
authorAnton L. Šijanec <anton@sijanec.eu>2020-04-29 22:38:41 +0200
committerAnton L. Šijanec <anton@sijanec.eu>2020-04-29 22:38:41 +0200
commit52a5a9d9bd8d767bd76c02f20668e1c7d92e33f6 (patch)
treebda89def263033aa7efc2f87e55b9c7add3013c0 /test/fopen_mkdir-test.c
parentdelam. (diff)
downloadbverbose-52a5a9d9bd8d767bd76c02f20668e1c7d92e33f6.tar
bverbose-52a5a9d9bd8d767bd76c02f20668e1c7d92e33f6.tar.gz
bverbose-52a5a9d9bd8d767bd76c02f20668e1c7d92e33f6.tar.bz2
bverbose-52a5a9d9bd8d767bd76c02f20668e1c7d92e33f6.tar.lz
bverbose-52a5a9d9bd8d767bd76c02f20668e1c7d92e33f6.tar.xz
bverbose-52a5a9d9bd8d767bd76c02f20668e1c7d92e33f6.tar.zst
bverbose-52a5a9d9bd8d767bd76c02f20668e1c7d92e33f6.zip
Diffstat (limited to 'test/fopen_mkdir-test.c')
-rw-r--r--test/fopen_mkdir-test.c14
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;
+}