mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 20:18:20 +00:00
btest/plugin: Add plugin testing enum identifiers
This plugin has a generic name, but for now just tests the API around enum types and enum vals at InitPostScript() time.
This commit is contained in:
parent
ab87ba9786
commit
cb610bdea2
5 changed files with 134 additions and 0 deletions
26
testing/btest/plugins/api-plugin.zeek
Normal file
26
testing/btest/plugins/api-plugin.zeek
Normal file
|
@ -0,0 +1,26 @@
|
|||
# @TEST-DOC: A plugin testing some parts Zeek's C++ API
|
||||
# @TEST-EXEC: ${DIST}/auxil/zeek-aux/plugin-support/init-plugin -u . Demo API
|
||||
# @TEST-EXEC: cp -r %DIR/api-plugin/* .
|
||||
#
|
||||
# @TEST-EXEC: ./configure --zeek-dist=${DIST} && make
|
||||
#
|
||||
# @TEST-EXEC: ZEEK_PLUGIN_PATH=`pwd` zeek %INPUT >output
|
||||
#
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER= btest-diff output
|
||||
|
||||
module DemoAPI;
|
||||
|
||||
export {
|
||||
type Severity: enum {
|
||||
CRITICAL = 1,
|
||||
ERROR = 2,
|
||||
WARNING = 3,
|
||||
INFO = 4,
|
||||
};
|
||||
}
|
||||
|
||||
module User;
|
||||
|
||||
redef enum DemoAPI::Severity += {
|
||||
USER_DEBUG = 50,
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue