zeek/testing/btest/language/null-statement.bro
Daniel Thayer 90281a2423 Add tests of the Bro scripting language
Added tests of all built-in Bro data types (including different
representations of constant values, and max./min. values), keywords, and
operators (including special properties of certain operators, such as
short-circuit evaluation and associativity).
2012-08-24 11:32:49 -05:00

34 lines
502 B
Text

# @TEST-EXEC: bro %INPUT >out
# @TEST-EXEC: btest-diff out
function f1(test: string)
{
; # null statement in function
}
event bro_init()
{
local s1: set[string] = set( "this", "test" );
; # null statement in event
for ( i in s1 )
; # null statement in for loop
if ( |s1| > 0 ) ; # null statement in if statement
f1("foo");
{ ; } # null compound statement
if ( |s1| == 0 )
{
print "Error: this should not happen";
}
else
; # null statement in else
print "done";
}