mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 19:18:19 +00:00
Fix is/as operators on vector values
This commit is contained in:
parent
4bd6da7186
commit
3a824a06ed
4 changed files with 24 additions and 2 deletions
4
testing/btest/Baseline/language.type-check-vector/output
Normal file
4
testing/btest/Baseline/language.type-check-vector/output
Normal file
|
@ -0,0 +1,4 @@
|
|||
T
|
||||
[one, two, 3]
|
||||
T
|
||||
[one, two, three]
|
18
testing/btest/language/type-check-vector.bro
Normal file
18
testing/btest/language/type-check-vector.bro
Normal 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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue