new btest to catch regressions to previous behavior/crash

This commit is contained in:
Vern Paxson 2022-01-14 14:10:15 -08:00
parent 57f6487111
commit d6a68ada22
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,2 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
I didn't crash!

View file

@ -0,0 +1,14 @@
# @TEST-EXEC: zeek -b %INPUT >output 2>&1
# @TEST-EXEC: btest-diff output
event zeek_init()
{
local my_var: table[string] of table[string] of vector of count;
my_var["a"] = table(["1"]=vector(), ["2"]=vector());
my_var["a"]["1"] += 16;
# This used to crash.
delete my_var["a"];
print "I didn't crash!";
}