summaryrefslogtreecommitdiff
path: root/test-suite/tests/srfi-105.test
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite/tests/srfi-105.test')
-rw-r--r--test-suite/tests/srfi-105.test39
1 files changed, 6 insertions, 33 deletions
diff --git a/test-suite/tests/srfi-105.test b/test-suite/tests/srfi-105.test
index 34ea47b55..201a6b824 100644
--- a/test-suite/tests/srfi-105.test
+++ b/test-suite/tests/srfi-105.test
@@ -1,6 +1,6 @@
;;;; srfi-105.test --- Test suite for Guile's SRFI-105 reader. -*- scheme -*-
;;;;
-;;;; Copyright (C) 2012, 2013 Free Software Foundation, Inc.
+;;;; Copyright (C) 2012, 2013, 2025 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
@@ -18,6 +18,7 @@
(define-module (test-srfi-105)
#:use-module (test-suite lib)
+ #:use-module (ice-9 source-properties)
#:use-module (srfi srfi-1))
(define (read-string s)
@@ -139,50 +140,22 @@
(pass-if (equal? '{e[1 2]} '($bracket-apply$ e 1 2)))
(pass-if (equal? '{e[1 . 2]} '($bracket-apply$ e 1 . 2)))
- ;; Verify that source position information is not recorded if not
- ;; asked for.
- (with-test-prefix "no positions"
- (pass-if "simple curly-infix list"
- (let ((sexp (with-read-options '(curly-infix)
- (lambda ()
- (read-string " {1 + 2 + 3}")))))
- (and (not (source-property sexp 'line))
- (not (source-property sexp 'column)))))
- (pass-if "mixed curly-infix list"
- (let ((sexp (with-read-options '(curly-infix)
- (lambda ()
- (read-string " {1 + 2 * 3}")))))
- (and (not (source-property sexp 'line))
- (not (source-property sexp 'column)))))
- (pass-if "singleton curly-infix list"
- (let ((sexp (with-read-options '(curly-infix)
- (lambda ()
- (read-string " { 1.0 }")))))
- (and (not (source-property sexp 'line))
- (not (source-property sexp 'column)))))
- (pass-if "neoteric expression"
- (let ((sexp (with-read-options '(curly-infix)
- (lambda ()
- (read-string " { f(x) }")))))
- (and (not (source-property sexp 'line))
- (not (source-property sexp 'column))))))
-
;; Verify that source position information is properly recorded.
(with-test-prefix "positions"
(pass-if "simple curly-infix list"
- (let ((sexp (with-read-options '(curly-infix positions)
+ (let ((sexp (with-read-options '(curly-infix)
(lambda ()
(read-string " {1 + 2 + 3}")))))
(and (equal? (source-property sexp 'line) 0)
(equal? (source-property sexp 'column) 1))))
(pass-if "mixed curly-infix list"
- (let ((sexp (with-read-options '(curly-infix positions)
+ (let ((sexp (with-read-options '(curly-infix)
(lambda ()
(read-string " {1 + 2 * 3}")))))
(and (equal? (source-property sexp 'line) 0)
(equal? (source-property sexp 'column) 1))))
(pass-if "singleton curly-infix list"
- (let ((sexp (with-read-options '(curly-infix positions)
+ (let ((sexp (with-read-options '(curly-infix)
(lambda ()
(read-string " { 1.0 }")))))
(and (equal? (source-property sexp 'line) 0)
@@ -191,7 +164,7 @@
((3) #t)
(else #f)))))
(pass-if "neoteric expression"
- (let ((sexp (with-read-options '(curly-infix positions)
+ (let ((sexp (with-read-options '(curly-infix)
(lambda ()
(read-string " { f(x) }")))))
(and (equal? (source-property sexp 'line) 0)