mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Add test for config framework
This commit is contained in:
parent
04c201393f
commit
e5d3d009fc
3 changed files with 28 additions and 0 deletions
|
@ -0,0 +1,3 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
warning: Value 'asdf' for source 'thread ../configfile/Input::READER_CONFIG' is not a valid enum.
|
||||
error: SendEvent for event InputConfig::new_value failed
|
|
@ -0,0 +1,5 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
{
|
||||
Red,
|
||||
Green
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
# @TEST-EXEC: btest-bg-run zeek zeek -b %INPUT
|
||||
# @TEST-EXEC: btest-bg-wait 10
|
||||
# @TEST-EXEC: btest-diff zeek/.stderr
|
||||
# @TEST-EXEC: btest-diff zeek/.stdout
|
||||
|
||||
@TEST-START-FILE configfile
|
||||
mycolors Red,asdf,Blue
|
||||
@TEST-END-FILE
|
||||
|
||||
@load base/frameworks/config
|
||||
|
||||
type Color: enum { Red, Green, Blue, };
|
||||
|
||||
option mycolors = set(Red, Green);
|
||||
|
||||
event zeek_init()
|
||||
{ Config::read_config("../configfile"); }
|
||||
|
||||
event Input::end_of_data(name: string, source:string)
|
||||
{ print mycolors; terminate(); }
|
Loading…
Add table
Add a link
Reference in a new issue