mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
update test suite to avoid GH-2385 problems, including incorrect typing
This commit is contained in:
parent
3c33728a2a
commit
66c5bdbeac
4 changed files with 24 additions and 12 deletions
|
@ -1,3 +1,9 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
[example, test]
|
||||
[80/tcp, http, 443/tcp, https, 21/tcp, ftp, 23/tcp, telnet]
|
||||
[example, test], vector of string
|
||||
[{
|
||||
[80/tcp, http] ,
|
||||
[443/tcp, https]
|
||||
}, {
|
||||
[21/tcp, ftp] ,
|
||||
[23/tcp, telnet]
|
||||
}], vector of set[port,string]
|
||||
|
|
|
@ -38,9 +38,15 @@ tab6, table[string,string] of vector of count, {
|
|||
[a, b] = [1, 2],
|
||||
[c, d] = [3, 4]
|
||||
}
|
||||
tab7, table[string,string] of list of count,count, {
|
||||
[a, b] = 1, 2,
|
||||
[c, d] = 3, 4
|
||||
tab7, table[string,string] of set[count], {
|
||||
[a, b] = {
|
||||
2,
|
||||
1
|
||||
},
|
||||
[c, d] = {
|
||||
4,
|
||||
3
|
||||
}
|
||||
}
|
||||
tab8, table[MyRecord] of count, {
|
||||
[[a=c, b=d]] = 43,
|
||||
|
|
|
@ -6,12 +6,12 @@ event zeek_init()
|
|||
{
|
||||
local t1: table[count] of string = table([5] = "test", [0] = "example");
|
||||
local t2 = table(
|
||||
["web"] = { [80/tcp, "http"], [443/tcp, "https"] },
|
||||
["login"] = { [21/tcp, "ftp"], [23/tcp, "telnet"] });
|
||||
["web"] = set( [80/tcp, "http"], [443/tcp, "https"] ),
|
||||
["login"] = set( [21/tcp, "ftp"], [23/tcp, "telnet"] ));
|
||||
|
||||
local v1: vector of set[string] = table_values(t1);
|
||||
local v1: vector of string = table_values(t1);
|
||||
local v2: vector of set[port, string] = table_values(t2);
|
||||
|
||||
print v1;
|
||||
print v2;
|
||||
print v1, type_name(v1);
|
||||
print v2, type_name(v2);
|
||||
}
|
||||
|
|
|
@ -79,8 +79,8 @@ event zeek_init()
|
|||
print "tab6", type_name(tab6), tab6;
|
||||
|
||||
local tab7 = table(
|
||||
["a", "b"] = [1, 2, ],
|
||||
["c", "d"] = [3, 4, ],
|
||||
["a", "b"] = set(1, 2, ),
|
||||
["c", "d"] = set(3, 4, ),
|
||||
);
|
||||
print "tab7", type_name(tab7), tab7;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue