From ddd46e370cc2f1ea2f8af3a6fc1d8970c1c8cdbf Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 27 Jun 2023 20:17:33 -0400 Subject: tests/mode: Test "s" and "t" perms --- (limited to 'tests/mode.c') diff --git a/tests/mode.c b/tests/mode.c index 924c332..972401d 100644 --- a/tests/mode.c +++ b/tests/mode.c @@ -44,15 +44,19 @@ int main() { umask(0022); - puts("1..8"); + puts("1..12"); _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, "u+s" , OPKG_OPK_OK, 0004644); + _test(0000644, "g+s" , OPKG_OPK_OK, 0002644); _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. */ + _test(0040755, "a+t" , OPKG_OPK_OK, 0041755); + _test(0040755, "+t" , OPKG_OPK_OK, 0041755); return EXIT_SUCCESS; } -- cgit v0.9.1