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