mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
29 lines
557 B
Text
29 lines
557 B
Text
# @TEST-DOC: Regression test for past ZAM issues with vector-of-any.
|
|
# @TEST-REQUIRES: test "${ZEEK_USE_CPP}" != "1"
|
|
#
|
|
# @TEST-EXEC: zeek -b -O ZAM %INPUT >output
|
|
# @TEST-EXEC: btest-diff output
|
|
|
|
global d: table[string] of vector of double &default=vector();
|
|
|
|
function crank_one(key: string)
|
|
{
|
|
local c = d[key];
|
|
c += |c|;
|
|
print c;
|
|
if ( |c| > 3 )
|
|
c = c[1:];
|
|
d[key] = c;
|
|
}
|
|
|
|
event zeek_init()
|
|
{
|
|
crank_one("foo");
|
|
crank_one("foo");
|
|
crank_one("foo");
|
|
crank_one("foo");
|
|
crank_one("foo");
|
|
crank_one("foo");
|
|
crank_one("foo");
|
|
crank_one("foo");
|
|
}
|