zeek/testing/btest/language/redeclaration-redefinition-errors.zeek
Arne Welzel 8109bbc52f Var/Func: Render function parameters using comma, not semicolon
A bit larger follow-up to what Tim pointed out: Function prototype descriptions
previously used semicolons to separate parameters.

Switch to use commas when a RecordType is used as function parameter.
Use existing "func_args" naming for consistency.
2023-10-04 17:42:30 +02:00

61 lines
1,007 B
Text

# @TEST-DOC: Test some redeclaration, redefinition errors.
# @TEST-EXEC-FAIL: zeek -b %INPUT >out 2>&1
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff out
global x = 1;
global x = 2;
@TEST-START-NEXT
global f: function() = function() { };
global f: function() = function() { };
@TEST-START-NEXT
global f: function();
global f: function();
@TEST-START-NEXT
event zeek_init()
{
local f = function() { };
local f = function() { };
}
@TEST-START-NEXT
event zeek_init()
{
local f: function();
local f: function();
}
@TEST-START-NEXT
event zeek_init()
{
local x = 1;
local x = 2;
}
@TEST-START-NEXT
global ev: event();
global ev: event();
@TEST-START-NEXT
global ev: event(x: bool, y: count);
global ev: event(x: bool, y: count);
@TEST-START-NEXT
global ev: event(x: bool);
global ev: event(xx: bool);
@TEST-START-NEXT
global f: event();
global f: hook();
global f: function();
@TEST-START-NEXT
global f = function() { };
global f: hook();
global f: event();