zeek/testing/btest/bifs/find_all.bro
Jon Siwek 95ffb1cf27 Quick pass over unit tests, adding -b flag to bro so they run faster.
Doing this made bifs/ ~3x faster and language/ ~2x faster.
2012-11-30 17:44:36 -06:00

18 lines
292 B
Text

#
# @TEST-EXEC: bro -b %INPUT >out
# @TEST-EXEC: btest-diff out
event bro_init()
{
local a = "this is a test";
local pat = /hi|es/;
local pat2 = /aa|bb/;
local b = find_all(a, pat);
local b2 = find_all(a, pat2);
for (i in b)
print i;
print "-------------------";
print |b2|;
}