Fix is/as operators on vector values

This commit is contained in:
Jon Siwek 2018-09-10 14:51:26 -05:00
parent 4bd6da7186
commit 3a824a06ed
4 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,4 @@
T
[one, two, 3]
T
[one, two, three]

View file

@ -0,0 +1,18 @@
# @TEST-EXEC: bro -b %INPUT >output 2>&1
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff output
type myvec: vector of any;
function check(a: any)
{
print a is myvec;
print a as myvec;
}
event bro_init()
{
local v = myvec("one", "two", 3);
check(v);
local sv = string_vec("one", "two", "three");
check(sv);
}