summaryrefslogtreecommitdiff
path: root/src/guile
diff options
context:
space:
mode:
authorLudovic Courtès2012-05-13 23:11:26 +0200
committerLudovic Courtès2012-05-13 23:11:26 +0200
commite10677ed464319816d36f1d545c3111f227b7eab (patch)
tree54fc5dfb6ca02073ac54fd640a1e65a24347e49a /src/guile
parent21d4763b4afd453fc7f8a66972f54812601a09ba (diff)
downloadskribilo-e10677ed464319816d36f1d545c3111f227b7eab.tar.gz
skribilo-e10677ed464319816d36f1d545c3111f227b7eab.tar.lz
skribilo-e10677ed464319816d36f1d545c3111f227b7eab.zip
SRFI-64: Write log files as UTF-8; display a backtrace upon error.
Changed copied from libchop v0.5.2-25-g657b029. * src/guile/srfi/srfi-64.upstream.scm (test-on-group-begin-simple)[guile-2]: Set %default-port-encoding to "UTF-8". (%test-evaluate-with-catch): Call `display-backtrace' upon error.
Diffstat (limited to 'src/guile')
-rw-r--r--src/guile/srfi/srfi-64.upstream.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/guile/srfi/srfi-64.upstream.scm b/src/guile/srfi/srfi-64.upstream.scm
index 15de1f1..037ba02 100644
--- a/src/guile/srfi/srfi-64.upstream.scm
+++ b/src/guile/srfi/srfi-64.upstream.scm
@@ -314,6 +314,10 @@
(log-file
(cond-expand (mzscheme
(open-output-file log-file-name 'truncate/replace))
+ (guile-2
+ (with-fluids ((%default-port-encoding
+ "UTF-8"))
+ (open-output-file log-file-name)))
(else (open-output-file log-file-name)))))
(display "%%%% Starting test " log-file)
(display suite-name log-file)
@@ -565,7 +569,11 @@
(define-syntax %test-evaluate-with-catch
(syntax-rules ()
((%test-evaluate-with-catch test-expression)
- (catch #t (lambda () test-expression) (lambda (key . args) #f))))))
+ (catch #t
+ (lambda () test-expression)
+ (lambda (key . args) #f)
+ (lambda (key . args)
+ (display-backtrace (make-stack #t) (current-error-port))))))))
(kawa
(define-syntax %test-evaluate-with-catch
(syntax-rules ()