npryce/hamkrest

Test DelimitingValuesInStrings::file_paths fails on Windows

Octogonapus opened this issue · 1 comments

On Windows 10, the test DelimitingValuesInStrings::file_paths fails (and I assume it does not fail on non-Windows platforms). The error is:

java.lang.AssertionError: expected: a value that is equal to "/foo/bar/baz"
but was: "\\foo\\bar\\baz"
Expected :a value that is equal to "/foo/bar/baz"

Actual   :"\\foo\\bar\\baz"

It looks like this is a Windows-specific issue given that the failure occurs because the platform's separator is different.

I've had another look, and production code does not refer to Path at all. This test is misleading, so I've rewritten it to remove the dependency in Path and make it naturally cross-platform.