2 Copyright © 2008-2014, The AROS Development Team. All rights reserved.
11 #include <proto/dos.h>
21 /* First something simple */
22 TEST((chdir("SYS:") != -1));
23 TEST((getcwd(path1
, sizeof(path1
)) != (char*) -1));
24 TEST(((fd
= open("SYS:", O_READ
)) != -1));
25 TEST((fchdir(fd
) != -1));
27 TEST((getcwd(path2
, sizeof(path2
)) != (char*) -1));
28 printf("Comparing paths: %s and %s\n", path1
, path2
);
29 TEST((strcmp(path1
, path2
) == 0));
31 /* Now more complicated case */
32 TEST((mkdir("T:__TEST__", 0777) != -1));
34 TEST((chdir("T:__TEST__") != -1));
35 TEST((getcwd(path1
, sizeof(path1
)) != (char*) -1));
36 TEST(((fd
= open("T:__TEST__", O_READ
)) != -1));
37 TEST((fchdir(fd
) != -1));
39 TEST((getcwd(path2
, sizeof(path2
)) != (char*) -1));
40 printf("Comparing paths: %s and %s\n", path1
, path2
);
41 TEST((strcmp(path1
, path2
) == 0));
43 /* Test directory is going to disappear soon, evacuate! */
44 TEST((chdir("SYS:") != -1));
55 DeleteFile("T:__TEST__");