From 0b0b57d94d4f84805b86d4184aa1598c0d47f7d2 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 30 Sep 2025 18:56:43 +0100 Subject: bin: Use (chibi match) instead of cdr. --- bin/run64 | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/bin/run64 b/bin/run64 index 5334084..3e355bf 100755 --- a/bin/run64 +++ b/bin/run64 @@ -1,7 +1,7 @@ #!r6rs ;;; -*- mode: scheme -*- ;;; run64 --- SRFI-64 test runner -;;; Copyright © 2022 Arun Isaac +;;; Copyright © 2022, 2025 Arun Isaac ;;; ;;; This file is part of run64. ;;; @@ -18,12 +18,20 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with run64. If not, see . -(import (rnrs programs) +(import (rnrs exceptions) + (rnrs programs) (srfi srfi-1) - (srfi srfi-64)) + (srfi srfi-64) + ;; We prefix (chibi match) imports with chibi: so as to not + ;; conflict with match bindings provided by the + ;; implementation. We should find a better solution, if at all + ;; possible. + (prefix (chibi match) chibi:)) (define (assq-ref alist key) - (cdr (assq key alist))) + (chibi:match (assq key alist) + ((_ . value) value) + (#f #f))) (define (color code str) (string-append (string #\esc) @@ -90,7 +98,9 @@ given string in an ANSI escape code." (let ((runner (make-runner))) (headline "test session starts" bold) (test-with-runner runner - (for-each load (cdr args))) + (for-each load + (chibi:match args + ((_ files ...) files)))) (newline) (unless (zero? (test-runner-fail-count runner)) (headline "FAILURES" red) -- cgit 1.4.1