# HG changeset patch # User Ludovic Chabant # Date 1437714501 25200 # Node ID 95b77239c3b785837f526b898855d3247ab3fd7b # Parent d90ccdf18156d39ca88d5da9059a8347603e9786 tests: Fix `find` tests on Windows. We need to expect OS-appropriate path separators in the output. diff -r d90ccdf18156 -r 95b77239c3b7 tests/cli/test_find.yaml --- a/tests/cli/test_find.yaml Thu Jul 23 22:07:32 2015 -0700 +++ b/tests/cli/test_find.yaml Thu Jul 23 22:08:21 2015 -0700 @@ -3,12 +3,14 @@ out: '' --- args: find +replace_out_path_sep: true in: pages/foo.md: '' out: | pages/foo.md --- args: find +replace_out_path_sep: true in: pages/foo.md: '' posts/2015-01-10_blah.md: '' @@ -17,6 +19,7 @@ posts/2015-01-10_blah.md --- args: find foo +replace_out_path_sep: true in: pages/foo.md: '' pages/bar.md: '' @@ -27,6 +30,7 @@ pages/foo/child.md --- args: find --exact *foo.md +replace_out_path_sep: true in: pages/foo.md: '' pages/bar.md: '' diff -r d90ccdf18156 -r 95b77239c3b7 tests/conftest.py --- a/tests/conftest.py Thu Jul 23 22:07:32 2015 -0700 +++ b/tests/conftest.py Thu Jul 23 22:08:21 2015 -0700 @@ -145,7 +145,11 @@ logging.getLogger().removeHandler(hdl) assert expected_code == exit_code - assert expected_out == memstream.getvalue() + + actual_out = memstream.getvalue() + if self.spec.get('replace_out_path_sep'): + expected_out = expected_out.replace('/', os.sep) + assert expected_out == actual_out def reportinfo(self): return self.fspath, 0, "bake: %s" % self.name