mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Fixed --keep-prefix functionality.
Changing to keep include prefixes had two side effects: the main file being parsed wasn't filtered out anymore, and include directory paths would be added to the path in the include statement. Also moved the include_test*.fbs files to sub directories so we can actually test the handling of -I etc. tested: on Linux. Change-Id: Ibae095cea7ab0cccbac15cfb5171719f6b5cad8c
This commit is contained in:
@@ -472,7 +472,11 @@ void ParseAndGenerateTextTest() {
|
||||
|
||||
// parse schema first, so we can use it to parse the data after
|
||||
flatbuffers::Parser parser;
|
||||
const char *include_directories[] = { test_data_path.c_str(), nullptr };
|
||||
auto include_test_path =
|
||||
flatbuffers::ConCatPathFileName(test_data_path, "include_test");
|
||||
const char *include_directories[] = {
|
||||
test_data_path.c_str(), include_test_path.c_str(), nullptr
|
||||
};
|
||||
TEST_EQ(parser.Parse(schemafile.c_str(), include_directories), true);
|
||||
TEST_EQ(parser.Parse(jsonfile.c_str(), include_directories), true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user