1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Relax srfi-105 source expectations

* test-suite/tests/srfi-105.test ("curly-infix"): For { EXPR }, allow
the source to be at the { rather than at EXPR.
This commit is contained in:
Andy Wingo 2021-03-03 17:08:12 +01:00
parent 079800d682
commit 118f0c23c4

View file

@ -186,13 +186,19 @@
(lambda () (lambda ()
(read-string " { 1.0 }"))))) (read-string " { 1.0 }")))))
(and (equal? (source-property sexp 'line) 0) (and (equal? (source-property sexp 'line) 0)
(equal? (source-property sexp 'column) 3)))) (case (source-property sexp 'column)
((1) (throw 'unresolved))
((3) #t)
(else #f)))))
(pass-if "neoteric expression" (pass-if "neoteric expression"
(let ((sexp (with-read-options '(curly-infix positions) (let ((sexp (with-read-options '(curly-infix positions)
(lambda () (lambda ()
(read-string " { f(x) }"))))) (read-string " { f(x) }")))))
(and (equal? (source-property sexp 'line) 0) (and (equal? (source-property sexp 'line) 0)
(equal? (source-property sexp 'column) 3))))) (case (source-property sexp 'column)
((1) (throw 'unresolved))
((3) #t)
(else #f))))))
;; Verify that neoteric expressions are recognized only within curly braces. ;; Verify that neoteric expressions are recognized only within curly braces.
(pass-if (equal? '(a(x)(y)) '(a (x) (y)))) (pass-if (equal? '(a(x)(y)) '(a (x) (y))))