mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
23 lines
538 B
Text
23 lines
538 B
Text
#
|
|
# @TEST-EXEC: bro %INPUT
|
|
# @TEST-EXEC: btest-diff testfile
|
|
|
|
event bro_init()
|
|
{
|
|
local vars: table[string] of string = { ["TESTBRO"] = "helloworld" };
|
|
|
|
# make sure the env. variable is not set
|
|
local myvar = getenv("BRO_ARG_TESTBRO");
|
|
if ( |myvar| != 0 )
|
|
exit(1);
|
|
|
|
# check if command runs with the env. variable defined
|
|
local a = system_env("echo $BRO_ARG_TESTBRO > testfile", vars);
|
|
if ( a != 0 )
|
|
exit(1);
|
|
|
|
# make sure the env. variable is still not set
|
|
myvar = getenv("BRO_ARG_TESTBRO");
|
|
if ( |myvar| != 0 )
|
|
exit(1);
|
|
}
|