yaffs update to quick tests.
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_truncate.c
diff --git a/direct/timothy_tests/quick_tests/test_yaffs_truncate.c b/direct/timothy_tests/quick_tests/test_yaffs_truncate.c
new file mode 100644 (file)
index 0000000..300c340
--- /dev/null
@@ -0,0 +1,25 @@
+#include "test_yaffs_truncate.h"
+
+int test_yaffs_truncate(void){
+       int handle=test_open_file();
+       if (handle>0){
+               return yaffs_truncate(FILE_PATH,FILE_SIZE_TRUNCATED );
+       }
+       else {
+               printf("error opening file");
+               return -1;
+       }
+}
+
+int test_yaffs_truncate_clean(void){
+       /* change file size back to orignal size */
+       int handle=test_open_file();
+       if (handle>0){
+               return yaffs_truncate(FILE_PATH,FILE_SIZE );
+       }
+       else {
+               printf("error opening file in clean function");
+               return -1;
+       }
+
+}