fathom icon indicating copy to clipboard operation
fathom copied to clipboard

Snapshot verification fails on Windows

Open wezm opened this issue 3 years ago • 3 comments

---- 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.

wezm avatar Mar 30 '22 01:03 wezm

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

brendanzab avatar Mar 30 '22 02:03 brendanzab

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

wezm avatar Mar 30 '22 03:03 wezm

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

brendanzab avatar Mar 30 '22 04:03 brendanzab