UTF-8 string ports in ecmascript test
authorAndy Wingo <wingo@pobox.com>
Tue, 15 Jan 2013 15:26:06 +0000 (16:26 +0100)
committerAndy Wingo <wingo@pobox.com>
Tue, 15 Jan 2013 15:32:17 +0000 (16:32 +0100)
* test-suite/tests/ecmascript.test (eread, eread/1): Make sure we can
  render the temporary string ports by specifying UTF-8.

test-suite/tests/ecmascript.test

index 8b5dd82..f15499c 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; ecmascript.test --- ECMAScript.      -*- mode: scheme; coding: utf-8; -*-
 ;;;;
-;;;;   Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+;;;;   Copyright (C) 2010, 2011, 2013 Free Software Foundation, Inc.
 ;;;;
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
 
 \f
 (define (eread str)
-  (call-with-input-string str read-ecmascript))
+  (with-fluids ((%default-port-encoding "utf-8"))
+    (call-with-input-string str read-ecmascript)))
 (define (eread/1 str)
-  (call-with-input-string str read-ecmascript/1))
+  (with-fluids ((%default-port-encoding "utf-8"))
+    (call-with-input-string str read-ecmascript/1)))
 
 (define-syntax parse
   (syntax-rules ()