mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
20 lines
336 B
Text
20 lines
336 B
Text
# @TEST-EXEC: zeek -b %INPUT >output
|
|
# @TEST-EXEC: btest-diff output
|
|
|
|
type Foo: record {
|
|
id: string;
|
|
};
|
|
|
|
redef record Foo += {
|
|
foo: Foo &optional;
|
|
};
|
|
|
|
event zeek_init()
|
|
{
|
|
local tbl: table[Foo] of Foo;
|
|
local f1 = Foo($id="1");
|
|
local f2 = Foo($id="2", $foo=f1);
|
|
print "===", |tbl|, tbl;
|
|
tbl[f1] = f2;
|
|
print "===", |tbl|, tbl;
|
|
}
|