yaffs Improvements on the quick tests code. note the bug is still here.
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_open_file_ENOENT.c
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_open_file_ENOENT.c b/direct/timothy_tests/quick_tests/test_yaffs_open_file_ENOENT.c
new file mode 100644 (file)
index 0000000..02c02bb
--- /dev/null
@@ -0,0 +1,21 @@
+#include "test_yaffs_open_file_ENOENT.h"
+
+
+int test_yaffs_open_file_ENOENT(void){
+       
+       int output=0;
+
+       /*printf("path %s\n",path); */
+       output=yaffs_open(FILE_PATH, O_TRUNC| O_RDWR, "/yaffs2/non_existant_file");
+       if (output==ENOENT){
+               return output;
+       }
+       else if (output >=0){
+               printf("non existant file opened.(which is a bad thing)\n");
+               return -1;
+       }
+}
+int test_yaffs_open_file_ENOENT_clean(void){
+       return 1;
+}
+