From de13d2faaa734e317add74af2ab0ddfe9b930b01 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 24 Jun 2026 03:28:04 +0100 Subject: tests: Compare syntax by converting to datum. --- tests/utils.scm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'tests') 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 +;;; Copyright © 2021–2023, 2025–2026 Arun Isaac ;;; ;;; 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 -- cgit 1.4.1