summaryrefslogtreecommitdiffstats
path: root/pigeonhole/tests/extensions/include/variables.svtest
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pigeonhole/tests/extensions/include/variables.svtest29
1 files changed, 29 insertions, 0 deletions
diff --git a/pigeonhole/tests/extensions/include/variables.svtest b/pigeonhole/tests/extensions/include/variables.svtest
new file mode 100644
index 0000000..5c4f8d8
--- /dev/null
+++ b/pigeonhole/tests/extensions/include/variables.svtest
@@ -0,0 +1,29 @@
+require "vnd.dovecot.testsuite";
+
+require "include";
+require "variables";
+
+global ["value1", "value2"];
+set "value1" "Works";
+set "value2" "fine.";
+
+global ["value3", "value4"];
+set "value3" "Yeah";
+set "value4" "it does.";
+
+include "variables-included1";
+include "variables-included2";
+include "variables-included3";
+
+global "result";
+
+test "Basic" {
+ if not string :is "${result}" "Works fine. Yeah it does." {
+ test_fail "invalid result: ${result}";
+ }
+
+ if string :is "${result}" "nonsense" {
+ test_fail "string test succeeds inappropriately";
+ }
+}
+