summaryrefslogtreecommitdiffstats
path: root/tests/preprocessor
diff options
context:
space:
mode:
Diffstat (limited to 'tests/preprocessor')
-rw-r--r--tests/preprocessor/include/pragma-once-c.h7
-rw-r--r--tests/preprocessor/pragma-once.slang12
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/preprocessor/include/pragma-once-c.h b/tests/preprocessor/include/pragma-once-c.h
new file mode 100644
index 000000000..c44e2e46c
--- /dev/null
+++ b/tests/preprocessor/include/pragma-once-c.h
@@ -0,0 +1,7 @@
+// pragma-once-c.h
+
+// Used by the `pragma-once.slang` test
+
+#pragma once
+
+#define ONLY_DEFINED_ONCE_C \ No newline at end of file
diff --git a/tests/preprocessor/pragma-once.slang b/tests/preprocessor/pragma-once.slang
index 02db6e3b3..43ddee680 100644
--- a/tests/preprocessor/pragma-once.slang
+++ b/tests/preprocessor/pragma-once.slang
@@ -31,6 +31,18 @@
#include "./pragma-once-a.h"
#include "./pragma-once-a.h"
+#include ".\pragma-once-a.h"
+#include "./include\../pragma-once-a.h"
+
+#include "../preprocessor/./pragma-once-a.h"
+
+#include "include/pragma-once-c.h"
+#include "./include\pragma-once-c.h"
+
+#ifndef ONLY_DEFINED_ONCE_C
+#undef BAR
+#endif
+
// Now let's use both the function and the
// macro, to confirm that they are both
// defined as expected.