mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00

- Use `-b` most everywhere, it will save time. - Start some intel tests upon the input file being fully read instead of at an arbitrary time. - Improve termination condition for some sumstats/cluster tests. - Filter uninteresting output from some supervisor tests. - Test for `notice_policy.log` is no longer needed.
31 lines
672 B
Text
31 lines
672 B
Text
# @TEST-EXEC: zeek -b %INPUT >output
|
|
# @TEST-EXEC: btest-diff output
|
|
|
|
module TestModule;
|
|
|
|
function change_function(t: table[string, int] of count, tpe: TableChange, idxa: string, idxb: int, val: count)
|
|
{
|
|
print "change_function", idxa, idxb, val, tpe;
|
|
t[idxa, idxb] = val+1;
|
|
}
|
|
|
|
function set_change(t: set[string], tpe: TableChange, idx: string)
|
|
{
|
|
print "set_change", idx, tpe;
|
|
}
|
|
|
|
global t: table[string, int] of count &on_change=change_function;
|
|
global s: set[string] &on_change=set_change;
|
|
|
|
event zeek_init()
|
|
{
|
|
print "inserting";
|
|
t["a", 1] = 5;
|
|
add s["hi"];
|
|
print "changing";
|
|
t["a", 1] = 2;
|
|
print "deleting";
|
|
delete t["a", 1];
|
|
delete s["hi"];
|
|
print t;
|
|
}
|