X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=direct%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_truncate.c;fp=direct%2Ftimothy_tests%2Fquick_tests%2Ftest_yaffs_truncate.c;h=300c340b93e2b031bdfac412a3d4558a29fd3cbb;hb=26592c53da98ac887099559afbcb8dda05264e1c;hp=0000000000000000000000000000000000000000;hpb=10fffbf6cc8a96cb9b3b9164c668202010e37faa;p=yaffs2.git 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 index 0000000..300c340 --- /dev/null +++ b/direct/timothy_tests/quick_tests/test_yaffs_truncate.c @@ -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; + } + +}