nanopass / nanopass-framework-scheme

The new nanopass framework; an embedded DSL for writing compilers in Scheme
nanopass.org
MIT License
487 stars 55 forks source link

Test Fails on Windows 10. #26

Open lijinpei opened 4 years ago

lijinpei commented 4 years ago

Platform: win10 1903, chez scheme installed from chocoloty How to reproduce:

  1. clone nanopass from github
  2. scheme test-all.ss What you expect to see: all test passes. What you got:
    Running error-messages test suite...
    Testing run-time-error-messages ...
    !!! expected error message "Exception in with-output-language: expected list of symbol but recieved x in field x* of (lambda (x* ...) body* ... body) from expression (quote x) at character position 31709 of tests/unit-tests.ss" does not match "Exception in with-output-language: expected list of symbol but recieved x in field x* of (lambda (x* ...) body* ... body) from expression (quote x) at character position 32575 of tests/unit-tests.ss"
    #f
    Ran 1 tests with 0 successes, 1 failures, and 0 exceptions

    The failed test is this one https://github.com/nanopass/nanopass-framework-scheme/blob/51f7cb82b07f588fa2caeece40ed75c3c60bfd93/tests/unit-tests.ss#L862 In fact, it is correct up to the character offset.

akeep commented 4 years ago

Thanks for the bug report, the precision on the character offsets has been a bit of a problem for this test suite for a while, and one I've meant to address.

I do most of my development on macOS, where the file is a unix-style text file with single-character line-endings. The Windows (or DOS) style file endings which are two-character cause the count to be slightly different.

I need to come up with a way to make this a bit more permissive, but I've not done it yet. Thanks for the bug report!