pgtoolkit icon indicating copy to clipboard operation
pgtoolkit copied to clipboard

Fix tests for cross-platform compatibilit

Open denini08 opened this issue 5 months ago • 2 comments

Fix #160

This PR fixes test failures on Windows caused by differences in file paths and line endings.

  • Normalizes error message patterns so they match correctly across platforms.
  • Adjusts line endings handling in tests to accept both \n and \r\n.
  • Updates path checks to use os.sep instead of hardcoded slashes.

These changes make the tests pass on Windows while keeping compatibility with Linux and mac. I’m happy to help, and let me know what you think.

denini08 avatar Aug 22 '25 19:08 denini08

Thanks a lot for your contribution. Unfortunately, we don't officially support Windows and we probably won't in a near future. Moreover we don't have any CI running on Windows so even if this fixes an issue, we can't make sure it does and will continue to work in the future.

pgiraud avatar Aug 25 '25 06:08 pgiraud

Hi @pgiraud

I get that Windows isn’t officially supported. I just thought this change wouldn’t hurt, won’t affect behavior on Linux/macOS, and might help anyone running tests on Windows.

Thanks for considering!

denini08 avatar Aug 25 '25 14:08 denini08