Introduce basic test triggering when zeek -r triggers script errors

I wonder if there's another one that covers errors during a basic zeek -r,
but didn't seem like.
This commit is contained in:
Arne Welzel 2022-09-08 18:32:13 +02:00
parent d5cd023dff
commit 700a9a4f37
4 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,14 @@
# @TEST-DOC: Running zeek -r in non-bare mode and ensure reporter errors happen.
# @TEST-EXEC: zeek -r $TRACES/http/get.trace %INPUT
# @TEST-EXEC: TEST_DIFF_CANONIFIER='$SCRIPTS/diff-remove-abspath | $SCRIPTS/diff-canonifier' btest-diff reporter.log
# @TEST-EXEC: btest-diff .stdout
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff .stderr
redef Reporter::info_to_stderr = T;
redef Reporter::errors_to_stderr = T;
redef Reporter::warnings_to_stderr = T;
event zeek_init()
{
Reporter::info("Hello, Zeek!");
}