summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-02-07 21:03:49 -0800
committerKaz Kylheku <kaz@kylheku.com>2020-02-07 21:03:49 -0800
commit158211060c413bcbdebba3f87478673cbee12dc0 (patch)
tree4181c8f72e0b96eba1be8e3cd682f493e52ce27c /tests
parent7b094eccd23ab67c39c4569ffd8e0ce7533038bb (diff)
downloadtxr-158211060c413bcbdebba3f87478673cbee12dc0.tar.gz
txr-158211060c413bcbdebba3f87478673cbee12dc0.tar.bz2
txr-158211060c413bcbdebba3f87478673cbee12dc0.zip
chmod: bug handling comma after right hand ugo.
* sysif.c (chmod_wrap): The chm_comma state is transitioned to after seeing a right hand side u, g or o. These do not combine with other letters, so ch_comma expects a comma after which a new permission clause we start,. Therefore the srcm and who variables must be rest. It's also a good idea to continue the loop. * tests/018/chmod.tl: New test case which exposed the above issue.
Diffstat (limited to 'tests')
-rw-r--r--tests/018/chmod.tl1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/018/chmod.tl b/tests/018/chmod.tl
index f815548c..a5494998 100644
--- a/tests/018/chmod.tl
+++ b/tests/018/chmod.tl
@@ -40,3 +40,4 @@
(cht "------------" "+rwx,g-r+w,o-r+w" "---rwx-wx-wx")
(cht "---------rwx" "u=rwsx" "s--rwx---rwx")
(cht "---------rwx" "u=rwsx,g=rwx,go-x" "s--rwxrw-rw-")
+(cht "---------rwx" "g=o,g-w+s,u=g,o-x" "-g-r-xr-xrw-")