zeek/testing/btest/language/invalid_index.bro
Jon Siwek 75278af8a1 Invalid vector indices now generate error message (addresses #24).
The error/behavior is the same as accessing tables at invalid indices.
2012-12-04 15:22:16 -06:00

15 lines
374 B
Text

# @TEST-EXEC: bro -b %INPUT >out 2>&1
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff out
global foo: vector of count = { 42 };
global foo2: table[count] of count = { [0] = 13 };
print "foo[0]", foo[0];
print "foo[1]", foo[1];
print "foo[2]", foo[2];
print "foo2[0]", foo2[0];
print "foo2[1]", foo2[1];
print "foo2[2]", foo2[2];
print "done";