zeek/testing/btest/language/record-recursive-table2.zeek
Patrick Kelley 8fd444092b initial
2025-05-07 15:35:15 -04:00

21 lines
336 B
Plaintext

# @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;
}