From c572b11f3d1e5c663ce28bfd1410df53b5019ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 7 Mar 2022 10:28:03 +0100 Subject: [PATCH] tests: Add read-syntax + syntax-source test. * test-suite/tests/reader.test ("read-syntax")["syntax-source"]: New test. --- test-suite/tests/reader.test | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test index ad7c6d575..27daf6106 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-2003,2007-2011,2013-2015,2020,2021 +;;;; Copyright (C) 1999, 2001-2003, 2007-2011, 2013-2015, 2020-2022 ;;;; Free Software Foundation, Inc. ;;;; ;;;; Jim Blandy @@ -554,7 +554,19 @@ (with-test-prefix "read-syntax" (pass-if-equal "annotations" 'args - (syntax-expression (call-with-input-string "( . args)" read-syntax)))) + (syntax-expression (call-with-input-string "( . args)" + read-syntax))) + + (pass-if-equal "syntax-source" + '((filename . "sample.scm") (line . 2) (column . 3)) + (syntax-source + (call-with-input-string "\ +;; first line +;; second line + (this is an expression)" + (lambda (port) + (set-port-filename! port "sample.scm") + (read-syntax port)))))) ;;; Local Variables: ;;; eval: (put 'with-read-options 'scheme-indent-function 1)