mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
31 lines
561 B
Text
31 lines
561 B
Text
# @TEST-EXEC-FAIL: bro -b %INPUT >out 2>&1
|
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff out
|
|
|
|
@load base/utils/queue
|
|
|
|
global q: Queue::Queue = Queue::init();
|
|
|
|
type myrec: record {
|
|
a: bool &default=T;
|
|
b: string &default="hi";
|
|
c: string &optional;
|
|
};
|
|
|
|
function foo(mr: myrec)
|
|
{
|
|
print mr$a;
|
|
print mr$c;
|
|
print mr$b;
|
|
}
|
|
|
|
event bro_init()
|
|
{
|
|
Queue::put(q, "hello");
|
|
Queue::put(q, "goodbye");
|
|
Queue::put(q, "test");
|
|
Queue::put(q, myrec());
|
|
|
|
local rval: vector of string = vector();
|
|
Queue::get_vector(q, rval);
|
|
print rval;
|
|
}
|