require "vnd.stalwart.testsuite"; require "include"; require "variables"; require "editheader"; /* * Testsuite self-test */ set "message" "."; addheader "X-Some-Header" "Header content"; test_result_reset; test_set "message" "${message}"; /* * Multi script */ test_result_reset; test_set "message" text: From: idiot@example.com To: idiot@example.org Subject: Frop! Frop. . ; test_result_reset; test "Multi script" { include "multiscript-before"; include "multiscript-personal"; include "multiscript-after"; test_message :folder "INBOX" 0; if not header "subject" "Frop!" { test_fail "keep not executed."; } if not header "X-Before" "before" { test_fail "No X-Before header"; } if not header "X-Personal" "personal" { test_fail "No X-Personal header"; } if not header "X-After" "after" { test_fail "No X-After header"; } }