From 51f8726c314884588fae3ddd92b8fa2d4f646bb2 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Tue, 3 May 2016 17:49:43 -0700 Subject: [PATCH] fix tests --- .../br/ragg/test/test-errors.rkt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/beautiful-racket-ragg/br/ragg/test/test-errors.rkt b/beautiful-racket-ragg/br/ragg/test/test-errors.rkt index d3ea23e..d2e789a 100755 --- a/beautiful-racket-ragg/br/ragg/test/test-errors.rkt +++ b/beautiful-racket-ragg/br/ragg/test/test-errors.rkt @@ -34,18 +34,21 @@ + +;; errors with position are sensitive to length of lang line +(define lang-line "#lang br/ragg") -(check-compile-error "#lang br/ragg" +(check-compile-error (format "~a" lang-line) "The grammar does not appear to have any rules") -(check-compile-error "#lang br/ragg\nfoo" - "Error while parsing grammar near: foo [line=2, column=0, position=12]") +(check-compile-error (format "~a\nfoo" lang-line) + "Error while parsing grammar near: foo [line=2, column=0, position=15]") -(check-compile-error "#lang br/ragg\nnumber : 42" - "Error while parsing grammar near: 42 [line=2, column=9, position=21]") +(check-compile-error (format "~a\nnumber : 42" lang-line) + "Error while parsing grammar near: 42 [line=2, column=9, position=24]") -(check-compile-error "#lang br/ragg\nnumber : 1" - "Error while parsing grammar near: 1 [line=2, column=9, position=21]") +(check-compile-error (format "~a\nnumber : 1" lang-line) + "Error while parsing grammar near: 1 [line=2, column=9, position=24]") @@ -127,7 +130,7 @@ EOF (check-compile-error #<