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

20 lines
335 B
Plaintext

# Ensures that an error is printed out for option variables
# that are containers if they aren't initialized.
# @TEST-EXEC-FAIL: zeek -b %INPUT > out
# @TEST-EXEC: btest-diff out
@load misc/stats
type TestRecord: record {
a: count;
b: Stats::Info &optional;
};
option foo: TestRecord &redef;
event zeek_init()
{
print foo;
}