2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
13 char testfilename
[] = "RAM:__TEST__";
19 fd
= creat(testfilename
, 0700);
22 TEST((stat(testfilename
, &buf
) != -1));
23 TEST(((buf
.st_mode
& 0777) == 0700));
24 TEST((chmod(testfilename
, 0111) != -1));
25 TEST((stat(testfilename
, &buf
) != -1));
26 TEST(((buf
.st_mode
& 0777) == 0111));
27 TEST((chmod(testfilename
, 0222) != -1));
28 TEST((stat(testfilename
, &buf
) != -1));
29 TEST(((buf
.st_mode
& 0777) == 0222));
30 TEST((chmod(testfilename
, 0333) != -1));
31 TEST((stat(testfilename
, &buf
) != -1));
32 TEST(((buf
.st_mode
& 0777) == 0333));
33 TEST((chmod(testfilename
, 0444) != -1));
34 TEST((stat(testfilename
, &buf
) != -1));
35 TEST(((buf
.st_mode
& 0777) == 0444));
36 TEST((chmod(testfilename
, 0555) != -1));
37 TEST((stat(testfilename
, &buf
) != -1));
38 TEST(((buf
.st_mode
& 0777) == 0555));
39 TEST((chmod(testfilename
, 0666) != -1));
40 TEST((stat(testfilename
, &buf
) != -1));
41 TEST(((buf
.st_mode
& 0777) == 0666));
42 TEST((chmod(testfilename
, 0777) != -1));
43 TEST((stat(testfilename
, &buf
) != -1));
44 TEST(((buf
.st_mode
& 0777) == 0777));