zeek/testing/btest/bifs/global_ids.zeek
Arne Welzel 1c2d1b3717 global_ids: Align script_id$type_name field with type_name()
Populate script_id$type_name with what the type_name() bif
would produce for the same identifier.

Closes #3490
2024-02-23 17:26:56 +01:00

18 lines
407 B
Text

#
# @TEST-EXEC: zeek -b %INPUT >out
# @TEST-EXEC: btest-diff out
event zeek_init()
{
local a = global_ids();
for ( k, v in a )
{
# the table is quite large, so just print the following.
if ( k in set("zeek_init", "Log::write", "Site::local_nets") )
{
print k, v$type_name;
assert type_name(lookup_ID(k)) == v$type_name, fmt("%s vs %s", type_name(lookup_ID(k)), v$type_name);
}
}
}