about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorArun Isaac2026-06-24 03:28:04 +0100
committerArun Isaac2026-06-24 03:28:04 +0100
commitde13d2faaa734e317add74af2ab0ddfe9b930b01 (patch)
tree6ee17fe4c4b0bfc4fe25c8b93fb8ad6d466be669 /tests
parent28a3a793ca8b3efe8c7ef1c4cf0df3c6bd3afaae (diff)
downloadccwl-de13d2faaa734e317add74af2ab0ddfe9b930b01.tar.gz
ccwl-de13d2faaa734e317add74af2ab0ddfe9b930b01.tar.lz
ccwl-de13d2faaa734e317add74af2ab0ddfe9b930b01.zip
tests: Compare syntax by converting to datum.
Diffstat (limited to 'tests')
-rw-r--r--tests/utils.scm15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/utils.scm b/tests/utils.scm
index d786d02..f3d9abd 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -1,5 +1,5 @@
 ;;; ccwl --- Concise Common Workflow Language
-;;; Copyright © 2021, 2022, 2023, 2025 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2021–2023, 2025–2026 Arun Isaac <arunisaac@systemreboot.net>
 ;;;
 ;;; This file is part of ccwl.
 ;;;
@@ -138,14 +138,11 @@
   ((syntax-lambda** (#:key* foo)
      foo)))
 
-;; We cannot use test-equal to compare syntax objects, since
-;; test-equal does not preserve the lexical contexts of the test
-;; expressions.
-(test-assert "Allow other keys in syntax-lambda**"
-  (equal? #'1
-          ((syntax-lambda** (#:key foo #:allow-other-keys)
-             foo)
-           #'#:foo #'1 #'#:bar #'2)))
+(test-equal "Allow other keys in syntax-lambda**"
+  1
+  (syntax->datum ((syntax-lambda** (#:key foo #:allow-other-keys)
+                    foo)
+                  #'#:foo #'1 #'#:bar #'2)))
 
 (test-assert "syntax-lambda** should raise an &unrecognized-keyword-assertion on unrecognized keywords in arguments"
   (guard (exception