]> Nishi Git Mirror - gwion.git/commitdiff
:white_check_mark: Add tests
authorJérémie Astor <astor.jeremie@wanadoo.fr>
Sun, 23 Feb 2020 13:35:59 +0000 (14:35 +0100)
committerJérémie Astor <astor.jeremie@wanadoo.fr>
Sun, 23 Feb 2020 13:35:59 +0000 (14:35 +0100)
tests/interp/empty.gw [new file with mode: 0644]
tests/interp/exp.gw [new file with mode: 0644]
tests/interp/exp_lit.gw [new file with mode: 0644]
tests/interp/lit.gw [new file with mode: 0644]
tests/interp/to_string.gw [new file with mode: 0644]

diff --git a/tests/interp/empty.gw b/tests/interp/empty.gw
new file mode 100644 (file)
index 0000000..6be8f59
--- /dev/null
@@ -0,0 +1 @@
+<<< `` >>>;
diff --git a/tests/interp/exp.gw b/tests/interp/exp.gw
new file mode 100644 (file)
index 0000000..264cf7b
--- /dev/null
@@ -0,0 +1,3 @@
+#! [contains] Hello, interpolation! 1
+1 => int my;
+<<< `Hello, interpolation! ${ my }` >>>;
diff --git a/tests/interp/exp_lit.gw b/tests/interp/exp_lit.gw
new file mode 100644 (file)
index 0000000..d57d205
--- /dev/null
@@ -0,0 +1,3 @@
+#! [contains] 1 Hello, interpolation!
+1 => int my;
+<<< `${my} Hello, interpolation!` >>>;
diff --git a/tests/interp/lit.gw b/tests/interp/lit.gw
new file mode 100644 (file)
index 0000000..849b094
--- /dev/null
@@ -0,0 +1,2 @@
+#! [contains] Hello, interpolation!
+<<< `Hello, interpolation!` >>>;
diff --git a/tests/interp/to_string.gw b/tests/interp/to_string.gw
new file mode 100644 (file)
index 0000000..1f137ad
--- /dev/null
@@ -0,0 +1,4 @@
+#! [contains] Hello, interpolation! 1
+1 => int my;
+`Hello, interpolation! ${ my }` => string s;
+<<< s >>>;