Skip to content

Commit

Permalink
tests: extprograms plugin: execute extension: Add test for large outp…
Browse files Browse the repository at this point in the history
…ut from program.
  • Loading branch information
stephanbosch committed Jan 10, 2018
1 parent d8d8cb8 commit 3a9ea42
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/plugins/extprograms/bin/big
@@ -0,0 +1,8 @@
#!/bin/sh

N="0123456701234567012345670123456701234567012345670123456701234567"
N="$N$N$N$N$N$N$N$N$N$N$N$N$N$N$N$N"
echo -n "$N$N"

exit 0

19 changes: 19 additions & 0 deletions tests/plugins/extprograms/execute/execute.svtest
Expand Up @@ -156,3 +156,22 @@ test "Execute - LF" {
test_fail "wrong string returned: '${out}'";
}
}

set "D" "0123456701234567012345670123456701234567012345670123456701234567";
set "D" "${D}${D}${D}${D}${D}${D}${D}${D}${D}${D}${D}${D}${D}${D}${D}${D}";
set "data" "${D}${D}";

test_config_set "sieve_execute_input_eol" "crlf";
test_config_reload :extension "vnd.dovecot.execute";
test_result_reset;
set "out" "";

test "Execute - big" {
execute
:output "out"
"big";

if not string "${out}" "${data}" {
test_fail "wrong string returned: '${out}'";
}
}

0 comments on commit 3a9ea42

Please sign in to comment.