summaryrefslogtreecommitdiffstats
path: root/tests/preprocessor
diff options
context:
space:
mode:
Diffstat (limited to 'tests/preprocessor')
-rw-r--r--tests/preprocessor/include-search-path.slang13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/preprocessor/include-search-path.slang b/tests/preprocessor/include-search-path.slang
new file mode 100644
index 000000000..77781b7bc
--- /dev/null
+++ b/tests/preprocessor/include-search-path.slang
@@ -0,0 +1,13 @@
+//TEST:SIMPLE: -Itests/preprocessor/include
+// #include support
+
+int foo() { return 0; }
+
+#include "pragma-once-c.h"
+
+// If include worked this will be defined
+#ifndef ONLY_DEFINED_ONCE_C
+// And so hitting this indicates and error (and will fail as bar isn't defined)
+int baz() { return bar(); }
+#endif
+