stchang / parsack

A basic Parsec-like monadic parser combinator library implementation in Racket.
MIT License
50 stars 10 forks source link

mysterious test failure #20

Closed stchang closed 10 years ago

stchang commented 10 years ago
(check-parse-error ($eof "a")
                   (fmt-err-msg 1 1 1 "non-empty-input" (list "end-of-file")))

fails with

--------------------
FAILURE
actual:     "parse ERROR: at 1:1:1\nunexpected: \"non-empty input\"\n  expected: \"end-of-file\""
expected:   "parse ERROR: at 1:1:1\nunexpected: \"non-empty-input\"\n  expected: \"end-of-file\""
name:       check-exn
location:   (#<path:/home/stchang/racket/parsack/parsack/tests/parsack-tests.rkt> 66 0 2425 108)
expression: (check-exn exn:fail:parsack? (thunk (with-handlers ((exn:fail:parsack? (λ (x) (check-equal? (exn-    message x) (fmt-err-msg 1 1 1 "non-empty-input" (list "end-of-file"))) (raise x)))) (force-Consumed ($eof "a")))))

     might be format issue? (ie ~a vs ~s?)

greghendershott commented 10 years ago

Hmm, I'm not seeing that (with either Racket 5.3.5 or 5.90.0.7--2013-08-1 in case that matters).

greghendershott commented 10 years ago

Oh wait, I'm getting it after pulling your most recent commits from the last hour or so...

stchang commented 10 years ago

Doh. There is an extra hyphen in the "expected".