[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem testing cond-expand syntax from (scheme base) in pure module
From: |
Maxim Cournoyer |
Subject: |
Problem testing cond-expand syntax from (scheme base) in pure module |
Date: |
Mon, 27 Nov 2023 15:50:11 -0500 |
Hello,
I'm trying to test cond-expand as provided by (scheme base), which is
the R7RS flavored version of cond-expand, but it fails when in a pure
Guile module:
--8<---------------cut here---------------start------------->8---
new file test-suite/tests/r7rs-cond-expand.test
@@ -0,0 +1,19 @@
+(define-module (test-suite r7rs-cond-expand)
+ #:pure
+ #:use-module (scheme base)
+ #:use-module ((srfi srfi-64) #:select (test-read-eval-string))
+ #:use-module (test-suite lib))
+
+(pass-if "cond-expand expression missing library test"
+ (test-read-eval-string "\
+(cond-expand
+ ((library (srfi srfi-99999))
+ #f)
+ (else #t))"))
+
+(pass-if "cond-expand expression found library test"
+ (test-read-eval-string "\
+(cond-expand
+ ((library (srfi srfi-64))
+ #t)
+ (else #f))"))
# Running it:
./meta/guile -L test-suite -L . test-suite/tests/r7rs-cond-expand.test
ERROR: cond-expand expression missing library test - arguments: ((syntax-error
#f "source expression failed to match any pattern" ((line . 1) (column . 2))
(library (srfi srfi-99999)) #f))
ERROR: cond-expand expression found library test - arguments: ((syntax-error #f
"source expression failed to match any pattern" ((line . 1) (column . 2))
(library (srfi srfi-64)) #f))
--8<---------------cut here---------------end--------------->8---
Would someone have a clue as to why?
If I drop #:pure, it then works as expected. Is this a bug?
--
Thanks,
Maxim
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Problem testing cond-expand syntax from (scheme base) in pure module,
Maxim Cournoyer <=