diff options
author | Elliott Hughes <enh@google.com> | 2020-12-03 14:48:16 -0800 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2020-12-04 01:39:22 -0600 |
commit | 60e8974e215801f6c29de9f4b786f45323e9af89 (patch) | |
tree | aa09c155caccb82078c137fc7f2c89d59c34d71e /tests | |
parent | 5fddea07aa15b9ff0d5f25c3a9a2b6a6b4db47b0 (diff) | |
download | toybox-60e8974e215801f6c29de9f4b786f45323e9af89.tar.gz |
chmod: support complex modes.
Change 5109da9b3e6a898c8e0ad647303a1b375e3d97d3 caused test.test to call
chmod with mode `u+s+s` which passes on the host (where you have a
toybox test but a GNU chmod) but fails on Android where chmod is toybox
too.
Add the missing loop to string_to_mode(), which means this will also
affect other toys, but that seems like a feature (and, for example, GNU
mkdir also accepts a mode like `a=r+w+x`).
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/chmod.test | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/chmod.test b/tests/chmod.test index 9dcf796e..2c8c6b91 100755 --- a/tests/chmod.test +++ b/tests/chmod.test @@ -112,6 +112,7 @@ chtest u+s "drwsr-xr-x\n-rwSr--r--\n" chtest +s "drwsr-sr-x\n-rwSr-Sr--\n" chtest o+s "drwxr-xr-x\n-rw-r--r--\n" chtest +t "drwxr-xr-t\n-rw-r--r-T\n" +chtest a=r+w+x "drwxrwxrwx\n-rwxrwxrwx\n" mkdir foo ln -s bar foo/baz |