mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
19 lines
340 B
Text
19 lines
340 B
Text
# @TEST-DOC: Regression test for incorrect constant propagation
|
|
# @TEST-REQUIRES: test "${ZEEK_USE_CPP}" != "1"
|
|
# @TEST-EXEC: zeek -b -O ZAM %INPUT >output
|
|
# @TEST-EXEC: btest-diff output
|
|
|
|
function foo(s: string)
|
|
{
|
|
if ( s == "foo" )
|
|
s = "bar";
|
|
else if ( s == "bar" )
|
|
s = "bletch";
|
|
|
|
print s;
|
|
}
|
|
|
|
event zeek_init()
|
|
{
|
|
foo("xyz");
|
|
}
|