summaryrefslogtreecommitdiff
path: root/test-suite/tests/reader.test
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite/tests/reader.test')
-rw-r--r--test-suite/tests/reader.test22
1 files changed, 19 insertions, 3 deletions
diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test
index 6f0ed1d59..13c852665 100644
--- a/test-suite/tests/reader.test
+++ b/test-suite/tests/reader.test
@@ -1,6 +1,6 @@
;;;; reader.test --- Reader test. -*- coding: iso-8859-1; mode: scheme -*-
;;;;
-;;;; Copyright (C) 1999, 2001, 2002, 2003, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;;;; Copyright (C) 1999, 2001, 2002, 2003, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
;;;; Jim Blandy <jimb@red-bean.com>
;;;;
;;;; This library is free software; you can redistribute it and/or
@@ -364,8 +364,24 @@
(with-output-to-string
(lambda ()
(write (integer->char #x80))))))
- "#\\x80"))))
-
+ "#\\x80")))
+
+ (with-test-prefix "hungry escapes"
+ (pass-if "default not hungry"
+ ;; Assume default setting of not hungry.
+ (equal? (with-input-from-string "\"foo\\\n bar\""
+ read)
+ "foo bar"))
+ (pass-if "hungry"
+ (dynamic-wind
+ (lambda ()
+ (read-enable 'hungry-eol-escapes))
+ (lambda ()
+ (equal? (with-input-from-string "\"foo\\\n bar\""
+ read)
+ "foobar"))
+ (lambda ()
+ (read-disable 'hungry-eol-escapes))))))
(with-test-prefix "#;"