Skip to content
Snippets Groups Projects
Commit b62d83a2 authored by Stephan Bosch's avatar Stephan Bosch
Browse files

tests: execute: Add tests for fileinto command executed with bad UTF-8 in folder name.

Compile error is avoided by putting the mailbox name in a variable, which is
(currently) only evaluated at runtime.
parent cb916cca
No related branches found
No related tags found
No related merge requests found
...@@ -133,3 +133,20 @@ test "Fileinto invalid folder name" { ...@@ -133,3 +133,20 @@ test "Fileinto invalid folder name" {
} }
} }
test "Fileinto bad UTF-8 in folder name" {
if not test_script_compile "errors/fileinto-bad-utf8.sieve" {
test_fail "compile failed";
}
if test_script_run {
test_fail "execution should have failed";
}
if not test_error :count "eq" :comparator "i;ascii-numeric" "1" {
test_fail "wrong number of runtime errors reported";
}
if not test_error :index 1 :contains "invalid folder name" {
test_fail "unexpected error reported";
}
}
require "fileinto";
require "variables";
require "encoded-character";
set "mailbox" "${hex:ff}rop";
fileinto "${mailbox}";
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.