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

Assert that paths are equal #27

Open
TikhonJelvis opened this issue Aug 25, 2020 · 2 comments
Open

Assert that paths are equal #27

TikhonJelvis opened this issue Aug 25, 2020 · 2 comments

Comments

@TikhonJelvis
Copy link

I recently found myself writing a function to check that filepaths are equal:

assertEqualPath got expected = do
  got'      <- canonicalizePath got
  expected' <- canonicalizePath expected
  assertBool (printf "expected: %s\n but got: %s" expected' got') $
    equalFilePath got' expected'

This depends on both directory and filepath, but both of those are GHC boot packages so that seems pretty reasonable.

Would it make sense to add this to HUnit? Happy to put together a PR if it would.

@ivanperez-keera
Copy link

This issue has been open for 4 years and there's been no activity. Would it make sense to close it?

@TikhonJelvis
Copy link
Author

Yeah, closing the issue is fine.

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

2 participants