Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshot verification fails on Windows #326

Open
wezm opened this issue Mar 30, 2022 · 3 comments
Open

Snapshot verification fails on Windows #326

wezm opened this issue Mar 30, 2022 · 3 comments

Comments

@wezm
Copy link
Contributor

wezm commented Mar 30, 2022

---- tests\fail\elaboration\unification\mismatch\arrow-both.fathom ----

    snapshot mismatch:
        ---- path ----
        tests\fail\elaboration\unification\mismatch\arrow-both.snap
        ---- stderr diff ----
         2| -   ┌─ tests/fail/elaboration/unification/mismatch/arrow-both.fathom:3:34
         2| +   ┌─ tests\fail\elaboration\unification\mismatch\arrow-both.fathom:3:34
         8| -   ┌─ tests/fail/elaboration/unification/mismatch/arrow-both.fathom:3:39
         8| +   ┌─ tests\fail\elaboration\unification\mismatch\arrow-both.fathom:3:39


    failures:
        snapshot mismatch

Paths in errors use the native format, thus Windows ones do not match.

@brendanzab
Copy link
Member

Hmm, I wonder how other compilers handle this in their tests. 🤔

@wezm
Copy link
Contributor Author

wezm commented Mar 30, 2022

rustc tests appear to assume unix-style paths and line endings:

https://github.com/rust-lang/rust/blob/master/src/test/ui/module-macro_use-arguments.stderr

and are normalised as such in the test runner:

https://github.com/rust-lang/rust/blob/44628f7273052d0bb8e8218518dacab210e1fe0d/src/tools/compiletest/src/runtest.rs#L3595-L3620

@brendanzab
Copy link
Member

Oh cool! I was looking in compiletest but missed this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants