mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00
Stmt: Introduce assert statement and related hooks
including two hooks called assertion_failure() and assertion_result() for customization and tracking of assertion results.
This commit is contained in:
parent
a25b1a9d59
commit
25ea678626
41 changed files with 635 additions and 3 deletions
5
testing/btest/language/assert-top-level.zeek
Normal file
5
testing/btest/language/assert-top-level.zeek
Normal file
|
@ -0,0 +1,5 @@
|
|||
# @TEST-EXEC-FAIL: zeek -b %INPUT >out
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff .stderr
|
||||
|
||||
assert getpid() > 0;
|
||||
assert getpid() == 0, fmt("my pid greater 0? %s", getpid() > 0);
|
Loading…
Add table
Add a link
Reference in a new issue