summaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
authorkx <kx@radix-linux.su>2026-10-01 12:02:28 +0300
committerkx <kx@radix-linux.su>2026-10-01 12:02:28 +0300
commitba1b04d64bdfaf377915b22f77520216ebe47674 (patch)
tree044343035c28b2b04ca9725f26e9b7c39342d19c /tests/data
parent124b140798456778e2a96851cc7268aa9a726698 (diff)
downloadmcpu-cpp-ba1b04d64bdfaf377915b22f77520216ebe47674.tar.xz
Version 1.0.21.0.2
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/base-path-main.c1
-rw-r--r--tests/data/common-precedence/same.h1
-rw-r--r--tests/data/config-main.c2
-rw-r--r--tests/data/config.conf2
-rw-r--r--tests/data/include-main.c6
-rw-r--r--tests/data/include/bridge.h4
-rw-r--r--tests/data/include/one.h1
-rw-r--r--tests/data/lang-as-precedence/same.h1
-rw-r--r--tests/data/lang-as/lang.h1
-rw-r--r--tests/data/lang-base/base.h1
-rw-r--r--tests/data/lang-base/diff/explicit.h1
-rw-r--r--tests/data/lang-diff/lang.h1
-rw-r--r--tests/data/lang-path-main.c6
-rw-r--r--tests/data/lang.c9
-rw-r--r--tests/data/nonucs2.c1
-rw-r--r--tests/data/order-main.c1
-rw-r--r--tests/data/system/order.h1
-rw-r--r--tests/data/system/system.h1
-rw-r--r--tests/data/unbalanced.c2
-rw-r--r--tests/data/user/order.h1
-rw-r--r--tests/data/utf8.c2
21 files changed, 46 insertions, 0 deletions
diff --git a/tests/data/base-path-main.c b/tests/data/base-path-main.c
new file mode 100644
index 0000000..6ca1ffb
--- /dev/null
+++ b/tests/data/base-path-main.c
@@ -0,0 +1 @@
+#include <base.h>
diff --git a/tests/data/common-precedence/same.h b/tests/data/common-precedence/same.h
new file mode 100644
index 0000000..8a7b2c8
--- /dev/null
+++ b/tests/data/common-precedence/same.h
@@ -0,0 +1 @@
+int from_common_include_root;
diff --git a/tests/data/config-main.c b/tests/data/config-main.c
new file mode 100644
index 0000000..892eb5e
--- /dev/null
+++ b/tests/data/config-main.c
@@ -0,0 +1,2 @@
+#include "one.h"
+#include <system.h>
diff --git a/tests/data/config.conf b/tests/data/config.conf
new file mode 100644
index 0000000..e395802
--- /dev/null
+++ b/tests/data/config.conf
@@ -0,0 +1,2 @@
+MCPU_CPP_INCLUDE_PATH = ./include;
+MCPU_CPP_SYSTEM_INCLUDE_PATH = ./system;
diff --git a/tests/data/include-main.c b/tests/data/include-main.c
new file mode 100644
index 0000000..93bca59
--- /dev/null
+++ b/tests/data/include-main.c
@@ -0,0 +1,6 @@
+#include "one.h"
+#include <system.h>
+#lang "diff"
+#include "bridge.h"
+y' = 1;
+#endlang
diff --git a/tests/data/include/bridge.h b/tests/data/include/bridge.h
new file mode 100644
index 0000000..a878df1
--- /dev/null
+++ b/tests/data/include/bridge.h
@@ -0,0 +1,4 @@
+/* Entered while current language is diff. */
+#endlang
+int bridge_c;
+#lang "diff"
diff --git a/tests/data/include/one.h b/tests/data/include/one.h
new file mode 100644
index 0000000..6200094
--- /dev/null
+++ b/tests/data/include/one.h
@@ -0,0 +1 @@
+int from_one;
diff --git a/tests/data/lang-as-precedence/same.h b/tests/data/lang-as-precedence/same.h
new file mode 100644
index 0000000..f139324
--- /dev/null
+++ b/tests/data/lang-as-precedence/same.h
@@ -0,0 +1 @@
+int from_as_specific_include_path;
diff --git a/tests/data/lang-as/lang.h b/tests/data/lang-as/lang.h
new file mode 100644
index 0000000..f1f9283
--- /dev/null
+++ b/tests/data/lang-as/lang.h
@@ -0,0 +1 @@
+MCPU_AS_LANGUAGE_PATH from_as_language_path;
diff --git a/tests/data/lang-base/base.h b/tests/data/lang-base/base.h
new file mode 100644
index 0000000..1d8a123
--- /dev/null
+++ b/tests/data/lang-base/base.h
@@ -0,0 +1 @@
+int from_base_language_include_root;
diff --git a/tests/data/lang-base/diff/explicit.h b/tests/data/lang-base/diff/explicit.h
new file mode 100644
index 0000000..fa9157f
--- /dev/null
+++ b/tests/data/lang-base/diff/explicit.h
@@ -0,0 +1 @@
+int from_explicit_diff_subdirectory;
diff --git a/tests/data/lang-diff/lang.h b/tests/data/lang-diff/lang.h
new file mode 100644
index 0000000..54603aa
--- /dev/null
+++ b/tests/data/lang-diff/lang.h
@@ -0,0 +1 @@
+y' = from_diff_language_path;
diff --git a/tests/data/lang-path-main.c b/tests/data/lang-path-main.c
new file mode 100644
index 0000000..864bc07
--- /dev/null
+++ b/tests/data/lang-path-main.c
@@ -0,0 +1,6 @@
+#lang "as"
+#include "lang.h"
+#endlang
+#lang "diff"
+#include "lang.h"
+#endlang
diff --git a/tests/data/lang.c b/tests/data/lang.c
new file mode 100644
index 0000000..75cdc70
--- /dev/null
+++ b/tests/data/lang.c
@@ -0,0 +1,9 @@
+int before;
+#lang "diff"
+y' = omega;
+#lang "alg"
+f = x + y;
+#endlang
+z' = y;
+#endlang
+int after;
diff --git a/tests/data/nonucs2.c b/tests/data/nonucs2.c
new file mode 100644
index 0000000..d8cc27c
--- /dev/null
+++ b/tests/data/nonucs2.c
@@ -0,0 +1 @@
+int x; /* 😀 */
diff --git a/tests/data/order-main.c b/tests/data/order-main.c
new file mode 100644
index 0000000..04cac0c
--- /dev/null
+++ b/tests/data/order-main.c
@@ -0,0 +1 @@
+#include <order.h>
diff --git a/tests/data/system/order.h b/tests/data/system/order.h
new file mode 100644
index 0000000..8e7f307
--- /dev/null
+++ b/tests/data/system/order.h
@@ -0,0 +1 @@
+int system_order;
diff --git a/tests/data/system/system.h b/tests/data/system/system.h
new file mode 100644
index 0000000..c94d2ab
--- /dev/null
+++ b/tests/data/system/system.h
@@ -0,0 +1 @@
+int from_system;
diff --git a/tests/data/unbalanced.c b/tests/data/unbalanced.c
new file mode 100644
index 0000000..1bf56c1
--- /dev/null
+++ b/tests/data/unbalanced.c
@@ -0,0 +1,2 @@
+#lang "diff"
+y' = 1;
diff --git a/tests/data/user/order.h b/tests/data/user/order.h
new file mode 100644
index 0000000..f6313ca
--- /dev/null
+++ b/tests/data/user/order.h
@@ -0,0 +1 @@
+int user_order;
diff --git a/tests/data/utf8.c b/tests/data/utf8.c
new file mode 100644
index 0000000..d5153ea
--- /dev/null
+++ b/tests/data/utf8.c
@@ -0,0 +1,2 @@
+/* UTF-8 source, UCS-2 internal representation. */
+const char *message = "Привет, MCPU";