Skip to content

executablePath test: fix file extension treatment

The executablePath test strips the file extension (if any) when comparing the query result with the expected value. This is to handle platforms where GHC adds a file extension to the output program file (e.g. .exe on Windows).

After the initial check, the file gets deleted (if supported). However, it tries to delete the stripped filename, which is incorrect. The test currently passes only because Windows does not allow deleting the program while any process created from it is alive.

Make the test program correct in general by deleting the non-stripped executable filename.

ALSO fix the test on NetBSD.

Edited by Fraser Tweedale

Merge request reports