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

Tests fail on windows #12

Open
hasufell opened this issue Jun 14, 2021 · 3 comments
Open

Tests fail on windows #12

hasufell opened this issue Jun 14, 2021 · 3 comments

Comments

@hasufell
Copy link

hasufell commented Jun 14, 2021

Reproducibly.

Test suite test: RUNNING...
Tests
  openNewBinaryFile:                          FAIL
    tests\test.hs:35:
    Does not match template: tes7ABD.txt
  mkTempFileName:                             OK
  withSystemTempFile:                         FAIL
    tests\test.hs:64:
    Does not match template: tes7ABE.txt
  withSystemTempDirectory:                    OK
  writeSystemTempFile:                        OK
  emptySystemTempFile:                        OK
  withSystemTempFile returns absolute path:   OK
  withSystemTempDirectory is not interrupted: OK (0.21s)

2 out of 8 tests failed (0.24s)
Test suite test: FAIL
Test suite logged to: C:\Users\hasuf\temporary\dist-newstyle\build\x86_64-windows\ghc-8.10.5\temporary-1.3\t\test\test\temporary-1.3-test.log
@hasufell
Copy link
Author

hasufell commented Jun 14, 2021

The test code makes incorrect assumptions and the documentation is vague.

The Win32 functions are clearly documented to have this behavior though: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettempfilenamew

The null-terminated prefix string. The function uses up to the first three characters of this string as the prefix of the file name. This string must consist of characters in the OEM-defined character set.

@hasufell
Copy link
Author

hasufell commented Jun 14, 2021

The behavior may be different depending on which I/O subsystem is active, but I'm getting errors trying with native IO manager.

haskell/win32#177

@hasufell
Copy link
Author

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

1 participant