diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-12-24 06:39:46 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-12-24 06:39:46 -0800 |
commit | 9a2e3f62d60b7257d28e638c0abfc9abf815d868 (patch) | |
tree | 6413a4cee3ebf9826d4d6d0251128d45bea07211 /tests/018/chmod.tl | |
parent | 0b4f7bf4c47c3be30a74b2a18c513af810df26cb (diff) | |
download | txr-9a2e3f62d60b7257d28e638c0abfc9abf815d868.tar.gz txr-9a2e3f62d60b7257d28e638c0abfc9abf815d868.tar.bz2 txr-9a2e3f62d60b7257d28e638c0abfc9abf815d868.zip |
chmod: disable some chmod tests on Cygwin.
* tests/018/chmod.tl: Certain chmod test cases no longer work
on Cygwin. The issue is the chmod system call. It produces
completely nonsensical results in some cases. We disable
these test cases on Cygwin.
Diffstat (limited to 'tests/018/chmod.tl')
-rw-r--r-- | tests/018/chmod.tl | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/tests/018/chmod.tl b/tests/018/chmod.tl index ada3f0be..04b63fe7 100644 --- a/tests/018/chmod.tl +++ b/tests/018/chmod.tl @@ -33,24 +33,29 @@ (error "failed to set mode with ~s: expected ~s, actual ~s" mode expected (enc-perm m))))))) -(cht "------------" "a+strwx" "sgtrwxrwxrwx") -(cht "------------" "+strwx" "sgtrwxr-xr-x") -(cht "------------" "u+s" "s-----------") -(cht "------------" "g+s" "-g----------") -(cht "------------" "+t" "--t---------") -(cht "sgtrwxrwxrwx" "=" "------------") -(cht "sgtrwxrwxrwx" "u=" "-gt---rwxrwx") -(cht "sgtrwxrwxrwx" "g=" "s-trwx---rwx") -(cht "sgtrwxrwxrwx" "o=" "sg-rwxrwx---") -(cht "------------" "u+s,g+s" "sg----------") -(cht "------------" "u+r,g+r,o+r,+t,+s" "sgtr--r--r--") -(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-") -(cht "---------rwx" "o=o" "---------rwx") -(cht "-----x------" "a+X" "-----x--x--x") -(cht "-----x------" "=,a+X" "------------") -(cht "-----x------" "a-x+X" "------------") -(cht "------------" "u+x-X" "------------") -(cht "------------" "o+x=o" "-----------x") +(let ((os (os-symbol))) + (cht "------------" "a+strwx" "sgtrwxrwxrwx") + (cht "------------" "+strwx" "sgtrwxr-xr-x") + (cht "------------" "u+s" "s-----------") + (cht "------------" "g+s" "-g----------") + (cht "------------" "+t" "--t---------") + (cht "sgtrwxrwxrwx" "=" "------------") + ;; These tests don't work on Cygwin 3.1.7, Windows 10. + ;; They worked on Cygwin 2.5 on Windows 7. + (unless (eq os :cygwin) + (cht "sgtrwxrwxrwx" "u=" "-gt---rwxrwx") + (cht "sgtrwxrwxrwx" "g=" "s-trwx---rwx") + (cht "sgtrwxrwxrwx" "o=" "sg-rwxrwx---")) + (cht "------------" "u+s,g+s" "sg----------") + (cht "------------" "u+r,g+r,o+r,+t,+s" "sgtr--r--r--") + (cht "------------" "+rwx,g-r+w,o-r+w" "---rwx-wx-wx") + (cht "---------rwx" "u=rwsx" "s--rwx---rwx") + (unless (eq os :cygwin) + (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-")) + (cht "---------rwx" "o=o" "---------rwx") + (cht "-----x------" "a+X" "-----x--x--x") + (cht "-----x------" "=,a+X" "------------") + (cht "-----x------" "a-x+X" "------------") + (cht "------------" "u+x-X" "------------") + (cht "------------" "o+x=o" "-----------x")) |