summaryrefslogtreecommitdiff
path: root/tests/include_test
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2017-05-24 15:21:26 -0700
committerWouter van Oortmerssen <aardappel@gmail.com>2017-05-24 16:26:57 -0700
commit22743ca45a3f835df423eb608837022a4a57dcc0 (patch)
treea53bde2c0bcdcfab2e0389939a13f9b166705924 /tests/include_test
parentfb87c0d3c6d76e200c0a81a746a248355f899414 (diff)
downloadflatbuffers-22743ca45a3f835df423eb608837022a4a57dcc0.tar.gz
flatbuffers-22743ca45a3f835df423eb608837022a4a57dcc0.tar.bz2
flatbuffers-22743ca45a3f835df423eb608837022a4a57dcc0.zip
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
Diffstat (limited to 'tests/include_test')
-rw-r--r--tests/include_test/include_test1.fbs5
-rw-r--r--tests/include_test/sub/include_test2.fbs9
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/include_test/include_test1.fbs b/tests/include_test/include_test1.fbs
new file mode 100644
index 00000000..39bc666b
--- /dev/null
+++ b/tests/include_test/include_test1.fbs
@@ -0,0 +1,5 @@
+include "sub/include_test2.fbs";
+include "sub/include_test2.fbs"; // should be skipped
+include "include_test1.fbs"; // should be skipped
+
+
diff --git a/tests/include_test/sub/include_test2.fbs b/tests/include_test/sub/include_test2.fbs
new file mode 100644
index 00000000..13aa229e
--- /dev/null
+++ b/tests/include_test/sub/include_test2.fbs
@@ -0,0 +1,9 @@
+include "sub/include_test2.fbs"; // should be skipped
+
+namespace MyGame.OtherNameSpace;
+
+enum FromInclude:long { IncludeVal }
+
+struct Unused {}
+
+