mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 10:08:20 +00:00

* origin/topic/seth/zeek_init: Some more testing fixes. Update docs and tests for bro_(init|done) -> zeek_(init|done) Implement the zeek_init handler.
51 lines
545 B
Text
51 lines
545 B
Text
# @TEST-EXEC: bro -b %INPUT >out
|
|
# @TEST-EXEC: btest-diff out
|
|
# Check if @if can be used to alternative function/event definitions
|
|
|
|
@if ( 1==1 )
|
|
function test_case(msg: string)
|
|
@else
|
|
lalala
|
|
@endif
|
|
{
|
|
print msg;
|
|
}
|
|
|
|
@if ( 1==1 )
|
|
event zeek_init()
|
|
@else
|
|
lalala
|
|
@endif
|
|
{
|
|
print "1";
|
|
test_case("2");
|
|
}
|
|
|
|
@if ( 1==0 )
|
|
lalala
|
|
@else
|
|
event zeek_init()
|
|
@endif
|
|
{
|
|
print "3";
|
|
}
|
|
|
|
@if ( 1==1 )
|
|
@if ( 1==1 )
|
|
event zeek_init()
|
|
@endif
|
|
@else
|
|
lalala
|
|
@endif
|
|
{
|
|
print "4";
|
|
}
|
|
|
|
@if ( 1==1 )
|
|
event zeek_init() &priority=10
|
|
@else
|
|
lalala
|
|
@endif
|
|
{
|
|
print "0";
|
|
}
|