mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 04:28:20 +00:00
btests for new --optimize-funcs and --optimize-files
This commit is contained in:
parent
267f5461d8
commit
a0e7feda6f
18 changed files with 198 additions and 0 deletions
22
testing/btest/opt/opt-func.zeek
Normal file
22
testing/btest/opt/opt-func.zeek
Normal file
|
@ -0,0 +1,22 @@
|
|||
# @TEST-EXEC: zeek -b -O ZAM --optimize-func='my_test' %INPUT >output
|
||||
# @TEST-EXEC: btest-diff output
|
||||
|
||||
# Tests that we can selectively a given function.
|
||||
|
||||
function my_test()
|
||||
{
|
||||
print "I should be ZAM code!";
|
||||
}
|
||||
|
||||
function another_test()
|
||||
{
|
||||
print "I shouldn't be ZAM code!";
|
||||
}
|
||||
|
||||
event zeek_init()
|
||||
{
|
||||
my_test();
|
||||
another_test();
|
||||
print my_test;
|
||||
print another_test;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue