mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
btest for https://github.com/zeek/zeek/issues/1763
This commit is contained in:
parent
0746ef7ecc
commit
87fce26a0b
2 changed files with 28 additions and 0 deletions
8
testing/btest/Baseline/language.vector-hole-loop/out
Normal file
8
testing/btest/Baseline/language.vector-hole-loop/out
Normal file
|
@ -0,0 +1,8 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
[, foo, bar, , baz]
|
||||
1
|
||||
2
|
||||
4
|
||||
foo
|
||||
bar
|
||||
baz
|
20
testing/btest/language/vector-hole-loop.zeek
Normal file
20
testing/btest/language/vector-hole-loop.zeek
Normal file
|
@ -0,0 +1,20 @@
|
|||
# @TEST-EXEC: zeek -b %INPUT >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
event zeek_init()
|
||||
{
|
||||
local v: vector of string;
|
||||
|
||||
v[1] = "foo";
|
||||
v[2] = "bar";
|
||||
v[4] = "baz";
|
||||
|
||||
print v;
|
||||
|
||||
for ( idx in v )
|
||||
print idx;
|
||||
|
||||
for ( idx in v )
|
||||
print v[idx];
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue