mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
22 lines
352 B
Text
22 lines
352 B
Text
# @TEST-DOC: Check for regression of "when" capture confusion over outer scope
|
|
#
|
|
# @TEST-EXEC: zeek -b %INPUT | sort >out
|
|
# @TEST-EXEC: btest-diff out
|
|
|
|
module Test;
|
|
|
|
event zeek_init()
|
|
{
|
|
local myset = set(10.0.0.1, 10.0.0.2);
|
|
|
|
when [myset] (T)
|
|
{
|
|
for ( ip in myset )
|
|
{
|
|
when [ip] ( ip == ip )
|
|
{
|
|
print fmt("%s", ip);
|
|
}
|
|
}
|
|
}
|
|
}
|