summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-02-10 04:07:37 -0800
committerKaz Kylheku <kaz@kylheku.com>2020-02-10 04:07:37 -0800
commitfe9c356178d9668c26448707d491e8d02be2f196 (patch)
treee11d67666ef61237b402fa635a8a40b5d42d57fd /tests
parentc1435fb4f2b8646d34cb608379bc2517f439f4fe (diff)
downloadtxr-fe9c356178d9668c26448707d491e8d02be2f196.tar.gz
txr-fe9c356178d9668c26448707d491e8d02be2f196.tar.bz2
txr-fe9c356178d9668c26448707d491e8d02be2f196.zip
chmod tests: use macro.
* tests/018/chmod.tl (mode-bits): Change body to correct quasiquote. (cht): Use previously unreferenced mode-bits macro.
Diffstat (limited to 'tests')
-rw-r--r--tests/018/chmod.tl6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/018/chmod.tl b/tests/018/chmod.tl
index 8cde28eb..7963f303 100644
--- a/tests/018/chmod.tl
+++ b/tests/018/chmod.tl
@@ -4,20 +4,20 @@
(defvarl tgt [*args* 0])
(defmacro mode-bits (st-mode)
- (logand st-mode #xFFF))
+ ^(logand ,st-mode #xFFF))
(defun cht (init mode expected)
(let ((ini (dec-perm init))
(exp (dec-perm expected)))
(chmod tgt ini)
(let* ((st (stat tgt))
- (m (logand st.mode #xFFF)))
+ (m (mode-bits st.mode)))
(unless (eql m ini)
(error "failed to set initial mode: expected: ~s, actual: ~s "
init (enc-perm m))))
(chmod tgt mode)
(let* ((st (stat tgt))
- (m (logand st.mode #xFFF)))
+ (m (mode-bits st.mode)))
(unless (eql m exp)
(error "failed to set mode with ~s: expected ~s, actual ~s"
mode expected (enc-perm m))))))