From: Sylvestre Ledru Date: Sun, 16 Nov 2025 22:19:14 +0000 (+0100) Subject: tests: install supports comma-separated mode strings X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c9303c5de07bedfa5260f2107605000ed108d40c;p=thirdparty%2Fcoreutils.git tests: install supports comma-separated mode strings Identified here: * tests/install/basic-1.sh: Add the check. --- diff --git a/tests/install/basic-1.sh b/tests/install/basic-1.sh index 741de7aef4..64636e5914 100755 --- a/tests/install/basic-1.sh +++ b/tests/install/basic-1.sh @@ -168,4 +168,17 @@ ginstall file1 file2 --mode=+w || fail=1 mode=$(ls -l file2|cut -b-10) test "$mode" = --w--w--w- || fail=1 +# Test comma-separated mode strings (like chmod) +touch file3 || framework_failure_ +ginstall file3 file4 --mode='ug+rw,o+r' || fail=1 +# Check that file4 has permissions -rw-rw-r-- +mode=$(ls -l file4|cut -b-10) +test "$mode" = -rw-rw-r-- || fail=1 + +# Test comma-separated mode with directory creation +ginstall -d testdir --mode='u+rwx,g+rx,o+r' || fail=1 +# Check that testdir has permissions drwxr-xr-- +mode=$(ls -ld testdir|cut -b-10) +test "$mode" = drwxr-xr-- || fail=1 + Exit $fail