summaryrefslogtreecommitdiffstats
path: root/tests/mode.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mode.c')
-rw-r--r--tests/mode.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/mode.c b/tests/mode.c
index 3944263..924c332 100644
--- a/tests/mode.c
+++ b/tests/mode.c
@@ -43,8 +43,16 @@ _test(mode_t cur_mode, const char *mode_str, int exp_ret, mode_t exp_mode)
int
main()
{
- puts("1..1");
- _test(0000644, "a+x", OPKG_OPK_OK, 0000755);
+ umask(0022);
+ puts("1..8");
+ _test(0000644, "a+x" , OPKG_OPK_OK, 0000755);
+ _test(0000755, "go-x" , OPKG_OPK_OK, 0000744);
+ _test(0000744, "a=rw", OPKG_OPK_OK, 0000666);
+ _test(0000644, "a+" , OPKG_OPK_OK, 0000644);
+ _test(0000644, "g=u" , OPKG_OPK_OK, 0000664);
+ _test(0000644, "u=o" , OPKG_OPK_OK, 0000444);
+ _test(0000664, "o+g" , OPKG_OPK_OK, 0000666);
+ _test(0000644, "+wx", OPKG_OPK_OK, 0000755); /* Affected by umask. */
return EXIT_SUCCESS;
}