diff options
Diffstat (limited to 'pigeonhole/tests/extensions/enotify/errors')
4 files changed, 50 insertions, 0 deletions
diff --git a/pigeonhole/tests/extensions/enotify/errors/from-mailto.sieve b/pigeonhole/tests/extensions/enotify/errors/from-mailto.sieve new file mode 100644 index 0000000..d519256 --- /dev/null +++ b/pigeonhole/tests/extensions/enotify/errors/from-mailto.sieve @@ -0,0 +1,7 @@ +require "enotify"; + +# 1: Invalid from address +notify :from "stephan#example.org" "mailto:stephan@example.com"; + +# 2: Empty from address +notify :from "" "mailto:stephan@example.com"; diff --git a/pigeonhole/tests/extensions/enotify/errors/options.sieve b/pigeonhole/tests/extensions/enotify/errors/options.sieve new file mode 100644 index 0000000..58d2265 --- /dev/null +++ b/pigeonhole/tests/extensions/enotify/errors/options.sieve @@ -0,0 +1,18 @@ +require "enotify"; + +# 1: empty option +notify :options "" "mailto:stephan@example.org"; + +# 2: invalid option name syntax +notify :options "frop" "mailto:stephan@example.org"; + +# 3: invalid option name syntax +notify :options "_frop=" "mailto:stephan@example.org"; + +# 4: invalid option name syntax +notify :options "=frop" "mailto:stephan@example.org"; + +# 5: invalid value +notify :options "frop=frml +frop" "mailto:stephan@example.org"; + diff --git a/pigeonhole/tests/extensions/enotify/errors/uri-mailto.sieve b/pigeonhole/tests/extensions/enotify/errors/uri-mailto.sieve new file mode 100644 index 0000000..2aced86 --- /dev/null +++ b/pigeonhole/tests/extensions/enotify/errors/uri-mailto.sieve @@ -0,0 +1,20 @@ +require "enotify"; + +# 1: Invalid character in to part +notify "mailto:stephan@example.org;?header=frop"; + +# 2: Invalid character in hname +notify "mailto:stephan@example.org?header<=frop"; + +# 3: Invalid character in hvalue +notify "mailto:stephan@example.org?header=fr>op"; + +# 4: Invalid header name +notify "mailto:stephan@example.org?header:=frop"; + +# 5: Invalid recipient +notify "mailto:stephan%23example.org"; + +# 6: Invalid to header recipient +notify "mailto:stephan@example.org?to=nico%23frop.example.org"; + diff --git a/pigeonhole/tests/extensions/enotify/errors/uri.sieve b/pigeonhole/tests/extensions/enotify/errors/uri.sieve new file mode 100644 index 0000000..13ead81 --- /dev/null +++ b/pigeonhole/tests/extensions/enotify/errors/uri.sieve @@ -0,0 +1,5 @@ +require "enotify"; + +# 1: Invalid url scheme +notify "snailto:stephan@example.org"; + |