summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rw-r--r--src/xyz/euandreh/heredoc.scm2
-rw-r--r--tests/heredoc.scm14
3 files changed, 23 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index fa340bd..8c1c50e 100644
--- a/Makefile
+++ b/Makefile
@@ -71,8 +71,15 @@ uninstall:
rm -f "$(DESTDIR)$(INFODIR)"/`basename $$i`; \
done
-check-guile:
- $(GUILE) -L src/ tests/heredoc.scm
+
+check-guile-evaled:
+ GUILE_AUTO_COMPILE=0 $(GUILE) -L src/ tests/heredoc.scm
+
+check-guile-compiled:
+ GUILE_AUTO_COMPILE=1 $(GUILE) -L src/ tests/heredoc.scm
+
+check-guile: check-guile-evaled check-guile-compiled
+
check: check-guile
diff --git a/src/xyz/euandreh/heredoc.scm b/src/xyz/euandreh/heredoc.scm
index ba7b727..a7b969d 100644
--- a/src/xyz/euandreh/heredoc.scm
+++ b/src/xyz/euandreh/heredoc.scm
@@ -98,5 +98,5 @@
s)))))
(define-macro (enable-syntax)
- `(eval-when (expand load eval)
+ `(eval-when (compile eval)
(read-hash-extend #\" (@ (xyz euandreh heredoc) reader))))
diff --git a/tests/heredoc.scm b/tests/heredoc.scm
index e368119..931b7a2 100644
--- a/tests/heredoc.scm
+++ b/tests/heredoc.scm
@@ -1,5 +1,6 @@
(use-modules
((xyz euandreh heredoc) #:prefix heredoc:)
+ ((language tree-il) #:prefix tree-il:)
((srfi srfi-64) #:prefix t:))
(heredoc:enable-syntax)
@@ -315,6 +316,16 @@ fi
fi
"""#)))
+(define (test-enable-syntax)
+ (t:test-group "enable-syntax"
+ (t:test-equal '(read-hash-extend #\"
+ (@ (xyz euandreh heredoc)
+ reader))
+ (tree-il:tree-il->scheme
+ (macroexpand
+ '(heredoc:enable-syntax))))))
+
+
(define test-fns
(list
test-extract-single-line-indentation
@@ -322,7 +333,8 @@ fi
test-maximum-indentation
test-trim-indentation
test-non-quote-chars?
- test-reader))
+ test-reader
+ test-enable-syntax))
(define (main)
(t:test-begin "heredoc")