From fe9c356178d9668c26448707d491e8d02be2f196 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 10 Feb 2020 04:07:37 -0800 Subject: chmod tests: use macro. * tests/018/chmod.tl (mode-bits): Change body to correct quasiquote. (cht): Use previously unreferenced mode-bits macro. --- tests/018/chmod.tl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/018') 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)))))) -- cgit v1.2.3