mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Allow Zeek function equality comparisons
Equality between two functions acts like a pointer comparison.
This commit is contained in:
parent
11949ce37a
commit
6e67a40d24
3 changed files with 28 additions and 0 deletions
4
testing/btest/Baseline/language.func-equality/out
Normal file
4
testing/btest/Baseline/language.func-equality/out
Normal file
|
@ -0,0 +1,4 @@
|
|||
F
|
||||
T
|
||||
T
|
||||
F
|
18
testing/btest/language/func-equality.zeek
Normal file
18
testing/btest/language/func-equality.zeek
Normal file
|
@ -0,0 +1,18 @@
|
|||
# @TEST-EXEC: zeek -b %INPUT >out
|
||||
# @TEST-EXEC: btest-diff out
|
||||
|
||||
function foo()
|
||||
{ print "foo"; }
|
||||
|
||||
function bar()
|
||||
{ print "bar"; }
|
||||
|
||||
global baz = bar;
|
||||
|
||||
event zeek_init()
|
||||
{
|
||||
print foo == bar;
|
||||
print foo != bar;
|
||||
print bar == baz;
|
||||
print bar != baz;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue