diff options
Diffstat (limited to '')
-rw-r--r-- | pigeonhole/tests/extensions/include/once.svtest | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pigeonhole/tests/extensions/include/once.svtest b/pigeonhole/tests/extensions/include/once.svtest new file mode 100644 index 0000000..3395c6b --- /dev/null +++ b/pigeonhole/tests/extensions/include/once.svtest @@ -0,0 +1,24 @@ +require "vnd.dovecot.testsuite"; +require "include"; +require "variables"; + +global "result"; + +set "result" ""; + +test "Included Once" { + include "once-1"; + include "once-2"; + + if string "${result}" " ONE TWO ONE" { + test_fail "duplicate included :once script"; + } + + if not string "${result}" " ONE TWO" { + test_fail "unexpected result value: ${result}"; + } +} + +test "Included Once recursive" { + include "once-3"; +} |