mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +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.
|
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||||
[example, test]
|
[example, test], vector of string
|
||||||
[80/tcp, http, 443/tcp, https, 21/tcp, ftp, 23/tcp, telnet]
|
[{
|
||||||
|
[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],
|
[a, b] = [1, 2],
|
||||||
[c, d] = [3, 4]
|
[c, d] = [3, 4]
|
||||||
}
|
}
|
||||||
tab7, table[string,string] of list of count,count, {
|
tab7, table[string,string] of set[count], {
|
||||||
[a, b] = 1, 2,
|
[a, b] = {
|
||||||
[c, d] = 3, 4
|
2,
|
||||||
|
1
|
||||||
|
},
|
||||||
|
[c, d] = {
|
||||||
|
4,
|
||||||
|
3
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tab8, table[MyRecord] of count, {
|
tab8, table[MyRecord] of count, {
|
||||||
[[a=c, b=d]] = 43,
|
[[a=c, b=d]] = 43,
|
||||||
|
|
|
@ -6,12 +6,12 @@ event zeek_init()
|
||||||
{
|
{
|
||||||
local t1: table[count] of string = table([5] = "test", [0] = "example");
|
local t1: table[count] of string = table([5] = "test", [0] = "example");
|
||||||
local t2 = table(
|
local t2 = table(
|
||||||
["web"] = { [80/tcp, "http"], [443/tcp, "https"] },
|
["web"] = set( [80/tcp, "http"], [443/tcp, "https"] ),
|
||||||
["login"] = { [21/tcp, "ftp"], [23/tcp, "telnet"] });
|
["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);
|
local v2: vector of set[port, string] = table_values(t2);
|
||||||
|
|
||||||
print v1;
|
print v1, type_name(v1);
|
||||||
print v2;
|
print v2, type_name(v2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,8 +79,8 @@ event zeek_init()
|
||||||
print "tab6", type_name(tab6), tab6;
|
print "tab6", type_name(tab6), tab6;
|
||||||
|
|
||||||
local tab7 = table(
|
local tab7 = table(
|
||||||
["a", "b"] = [1, 2, ],
|
["a", "b"] = set(1, 2, ),
|
||||||
["c", "d"] = [3, 4, ],
|
["c", "d"] = set(3, 4, ),
|
||||||
);
|
);
|
||||||
print "tab7", type_name(tab7), tab7;
|
print "tab7", type_name(tab7), tab7;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue