Closed kevans91 closed 6 years ago
I think the fix is correct. The only better solution I can think of to the test is to preprocess the tests and pass pwd
as a predefined value. It might be good to have some tests that are passed through cpp
first anyway, to make sure that we correctly ignore line number things.
I don't necessarily like what I've done in Tests/testexpected.sh to make this work, but I couldn't come up with a cleaner way to test this that is just as safe.
The problem was generally that text_input_buffer::read_binary_file was handling absolute paths wrong, prepending dir/ to the filename regardless of what filename looked like. This PR addresses it by checking if filename is an absolute path and leaving it as-is if so. We also don't fallback to include_paths checks if we're given an absolute path.