a6afa51a3722493b1f9ea97dc8e590943d7751fd
[yaffs2.git] / direct / timothy_tests / quick_tests / test_yaffs_lseek.c
1 #include "test_yaffs_lseek.h"
2
3 static int handle=0;
4 int test_yaffs_lseek(void){
5         handle=test_yaffs_open_file();
6         char text[20]="\0";
7         int output=0;
8         if (handle>0){
9                 if (0==yaffs_lseek(handle, 0, SEEK_SET)){
10                         return 1;
11                 }
12                 else {
13                         printf("lseek returned a different position to the expeced position\n");
14                 }
15         }
16         else {
17                 printf("error opening file\n");
18                 return -1;
19         }
20         
21 }
22
23 int test_yaffs_lseek_clean(void){
24         return yaffs_close(handle);     
25 }
26