You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the Cryptol test suite has many golden output files that require Windows-specific output (see T16.icry.stdout.mingw32 for one such example). The thing is, most of these Windows-specific golden files are actually checking for the same output as non-Windows operating systems, except with / path separators replaced with Windows-specific \ path separators. For example, the contents of T16.icry.stdout are exactly the same as T16.icry.stdout.mingw32, except that T16\B.cry on line 6 has been replaced with T16/B.cry (and similarly on line 9).
This is unfortunate, as it means that we have to maintain multiple golden files for various tests, and it is all too easy to forget to update the golden files for an operating system that you're not currently using. To avoid needing to do this quite so much, I propose that the Cryptol test suite normalize path separators to / in golden output. That way, the T16.icry test case above would display T16/B.cry regardless of whether Windows is used or not, which would allow us to have only a single golden file for this test case.
For inspiration, here is the code that GHC's test suite uses for normalizing path separators. This makes an effort to avoid converting things like \" (an escaped " character) to /", and it also avoids converting lambda expressions like \x -> x to /x -> x.
The text was updated successfully, but these errors were encountered:
Currently, the Cryptol test suite has many golden output files that require Windows-specific output (see
T16.icry.stdout.mingw32
for one such example). The thing is, most of these Windows-specific golden files are actually checking for the same output as non-Windows operating systems, except with/
path separators replaced with Windows-specific\
path separators. For example, the contents ofT16.icry.stdout
are exactly the same asT16.icry.stdout.mingw32
, except thatT16\B.cry
on line 6 has been replaced withT16/B.cry
(and similarly on line 9).This is unfortunate, as it means that we have to maintain multiple golden files for various tests, and it is all too easy to forget to update the golden files for an operating system that you're not currently using. To avoid needing to do this quite so much, I propose that the Cryptol test suite normalize path separators to
/
in golden output. That way, theT16.icry
test case above would displayT16/B.cry
regardless of whether Windows is used or not, which would allow us to have only a single golden file for this test case.For inspiration, here is the code that GHC's test suite uses for normalizing path separators. This makes an effort to avoid converting things like
\"
(an escaped"
character) to/"
, and it also avoids converting lambda expressions like\x -> x
to/x -> x
.The text was updated successfully, but these errors were encountered: