summaryrefslogtreecommitdiffstats
path: root/pigeonhole/tests/extensions/include/execute
diff options
context:
space:
mode:
Diffstat (limited to 'pigeonhole/tests/extensions/include/execute')
-rw-r--r--pigeonhole/tests/extensions/include/execute/actions-fileinto.sieve5
-rw-r--r--pigeonhole/tests/extensions/include/execute/namespace.sieve26
-rw-r--r--pigeonhole/tests/extensions/include/execute/optional.sieve5
3 files changed, 36 insertions, 0 deletions
diff --git a/pigeonhole/tests/extensions/include/execute/actions-fileinto.sieve b/pigeonhole/tests/extensions/include/execute/actions-fileinto.sieve
new file mode 100644
index 0000000..b0b8157
--- /dev/null
+++ b/pigeonhole/tests/extensions/include/execute/actions-fileinto.sieve
@@ -0,0 +1,5 @@
+require "include";
+
+include "actions-fileinto1";
+include "actions-fileinto2";
+include "actions-fileinto3";
diff --git a/pigeonhole/tests/extensions/include/execute/namespace.sieve b/pigeonhole/tests/extensions/include/execute/namespace.sieve
new file mode 100644
index 0000000..cbe41a2
--- /dev/null
+++ b/pigeonhole/tests/extensions/include/execute/namespace.sieve
@@ -0,0 +1,26 @@
+require "vnd.dovecot.testsuite";
+require "include";
+require "variables";
+
+set "global.a" "none";
+include :personal "namespace";
+
+if string "${global.a}" "none" {
+ test_fail "personal script not executed";
+}
+
+if not string "${global.a}" "personal" {
+ test_fail "executed global instead of personal script: ${global.a}";
+}
+
+set "global.a" "none";
+include :global "namespace";
+
+if string "{global.a}" "none" {
+ test_fail "global script not executed";
+}
+
+if not string "${global.a}" "global" {
+ test_fail "executed personal instead of global script: ${global.a}";
+}
+
diff --git a/pigeonhole/tests/extensions/include/execute/optional.sieve b/pigeonhole/tests/extensions/include/execute/optional.sieve
new file mode 100644
index 0000000..a6ad479
--- /dev/null
+++ b/pigeonhole/tests/extensions/include/execute/optional.sieve
@@ -0,0 +1,5 @@
+require "include";
+
+include :optional "optional-1";
+include :optional "optional-2";
+include :optional "optional-3";