zeek/testing/btest/language/locals-to-global.zeek
Evan Typanski 7160e074f6 Do not export locals
Fixes #4227
2025-02-12 13:49:12 -08:00

24 lines
348 B
Text

# @TEST-DOC: Ensure that locals are not hoisted to global scope.
# @TEST-EXEC: zeek -b %INPUT
# @TEST-EXEC: TEST_DIFF_CANONIFIER= btest-diff .stdout
module Test;
export {
function func1()
{
local t: string = "one";
print t;
}
function func2()
{
local t: string = "two";
print t;
}
}
event zeek_init()
{
func1();
func2();
}