From 9657cc5db7d8abac9bcd9ea166759acbac091427 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 23 Feb 2020 14:35:59 +0100 Subject: [PATCH] :white_check_mark: Add tests --- tests/interp/empty.gw | 1 + tests/interp/exp.gw | 3 +++ tests/interp/exp_lit.gw | 3 +++ tests/interp/lit.gw | 2 ++ tests/interp/to_string.gw | 4 ++++ 5 files changed, 13 insertions(+) create mode 100644 tests/interp/empty.gw create mode 100644 tests/interp/exp.gw create mode 100644 tests/interp/exp_lit.gw create mode 100644 tests/interp/lit.gw create mode 100644 tests/interp/to_string.gw diff --git a/tests/interp/empty.gw b/tests/interp/empty.gw new file mode 100644 index 00000000..6be8f59e --- /dev/null +++ b/tests/interp/empty.gw @@ -0,0 +1 @@ +<<< `` >>>; diff --git a/tests/interp/exp.gw b/tests/interp/exp.gw new file mode 100644 index 00000000..264cf7b4 --- /dev/null +++ b/tests/interp/exp.gw @@ -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 index 00000000..d57d2055 --- /dev/null +++ b/tests/interp/exp_lit.gw @@ -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 index 00000000..849b094e --- /dev/null +++ b/tests/interp/lit.gw @@ -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 index 00000000..1f137ada --- /dev/null +++ b/tests/interp/to_string.gw @@ -0,0 +1,4 @@ +#! [contains] Hello, interpolation! 1 +1 => int my; +`Hello, interpolation! ${ my }` => string s; +<<< s >>>; -- 2.43.0