mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
BTest updates in support of compiling-scripts-to-C++
This commit is contained in:
parent
0a813a53c7
commit
8876ec6f2d
10 changed files with 35 additions and 29 deletions
|
@ -1 +0,0 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
|
|
@ -1 +0,0 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
|
|
@ -1 +1,5 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
|
Run 0
|
||||||
|
Run 1
|
||||||
|
Run 2
|
||||||
|
Run 3
|
|
@ -1,3 +1,7 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
event(), []
|
===, 0, {
|
||||||
event(s:string), [abc]
|
|
||||||
|
}
|
||||||
|
===, 1, {
|
||||||
|
[[id=1, foo=<uninitialized>]] = [id=2, foo=[id=1, foo=<uninitialized>]]
|
||||||
|
}
|
|
@ -1,5 +1,8 @@
|
||||||
# Verifies analyzer ID retrieval from a connection.
|
# Verifies analyzer ID retrieval from a connection.
|
||||||
#
|
#
|
||||||
|
# Not compatible with -O gen-C++ due to use of multiple scripts.
|
||||||
|
# @TEST-REQUIRES: test "${ZEEK_USE_CPP}" != "1"
|
||||||
|
#
|
||||||
# @TEST-EXEC: zeek -b -r ${TRACES}/ssh/ssh-on-port-80.trace %INPUT >output
|
# @TEST-EXEC: zeek -b -r ${TRACES}/ssh/ssh-on-port-80.trace %INPUT >output
|
||||||
# @TEST-EXEC: btest-diff output
|
# @TEST-EXEC: btest-diff output
|
||||||
|
|
||||||
|
|
|
@ -7,21 +7,18 @@ event zeek_init()
|
||||||
local _ = "1";
|
local _ = "1";
|
||||||
}
|
}
|
||||||
|
|
||||||
#@TEST-START-NEXT
|
|
||||||
event zeek_init()
|
event zeek_init()
|
||||||
{
|
{
|
||||||
local _: string = "1";
|
local _: string = "1";
|
||||||
local _: count = 1;
|
local _: count = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#@TEST-START-NEXT
|
|
||||||
event zeek_init()
|
event zeek_init()
|
||||||
{
|
{
|
||||||
local _: string = "1";
|
local _: string = "1";
|
||||||
const _: count = 1;
|
const _: count = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#@TEST-START-NEXT
|
|
||||||
event zeek_init()
|
event zeek_init()
|
||||||
{
|
{
|
||||||
const _: string = "1";
|
const _: string = "1";
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# @TEST-EXEC: zeek -b %INPUT
|
# @TEST-EXEC: zeek -b %INPUT
|
||||||
# @TEST-EXEC: cp .stderr output
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff .stderr
|
||||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff output
|
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff .stdout
|
||||||
|
|
||||||
redef exit_only_after_terminate = T;
|
redef exit_only_after_terminate = T;
|
||||||
|
|
||||||
|
|
|
@ -34,23 +34,3 @@ event zeek_init()
|
||||||
# This will be size 1
|
# This will be size 1
|
||||||
print "===", |tbl|, tbl;
|
print "===", |tbl|, tbl;
|
||||||
}
|
}
|
||||||
|
|
||||||
#@TEST-START-NEXT
|
|
||||||
|
|
||||||
type Foo: record {
|
|
||||||
id: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
redef record Foo += {
|
|
||||||
foo: Foo &optional;
|
|
||||||
};
|
|
||||||
|
|
||||||
event zeek_init()
|
|
||||||
{
|
|
||||||
local tbl: table[Foo] of Foo;
|
|
||||||
local f1 = Foo($id="1");
|
|
||||||
local f2 = Foo($id="2", $foo=f1);
|
|
||||||
print "===", |tbl|, tbl;
|
|
||||||
tbl[f1] = f2;
|
|
||||||
print "===", |tbl|, tbl;
|
|
||||||
}
|
|
||||||
|
|
20
testing/btest/language/record-recursive-table2.zeek
Normal file
20
testing/btest/language/record-recursive-table2.zeek
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# @TEST-EXEC: zeek -b %INPUT >output
|
||||||
|
# @TEST-EXEC: btest-diff output
|
||||||
|
|
||||||
|
type Foo: record {
|
||||||
|
id: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
redef record Foo += {
|
||||||
|
foo: Foo &optional;
|
||||||
|
};
|
||||||
|
|
||||||
|
event zeek_init()
|
||||||
|
{
|
||||||
|
local tbl: table[Foo] of Foo;
|
||||||
|
local f1 = Foo($id="1");
|
||||||
|
local f2 = Foo($id="2", $foo=f1);
|
||||||
|
print "===", |tbl|, tbl;
|
||||||
|
tbl[f1] = f2;
|
||||||
|
print "===", |tbl|, tbl;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue