Relax srfi-105 source expectations
authorAndy Wingo <wingo@pobox.com>
Wed, 3 Mar 2021 16:08:12 +0000 (17:08 +0100)
committerAndy Wingo <wingo@pobox.com>
Wed, 3 Mar 2021 16:08:55 +0000 (17:08 +0100)
* test-suite/tests/srfi-105.test ("curly-infix"): For { EXPR }, allow
the source to be at the { rather than at EXPR.

test-suite/tests/srfi-105.test

index d212bd0842336061b53705ab2de129bc9952f1cd..34ea47b5576d6116d485677bf75f44be10b5828a 100644 (file)
                     (lambda ()
                       (read-string " { 1.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"
       (let ((sexp (with-read-options '(curly-infix positions)
                     (lambda ()
                       (read-string " { f(x) }")))))
         (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.
   (pass-if (equal? '(a(x)(y))               '(a (x) (y))))