zeek/testing/btest/bifs/rotate_file.zeek
Jon Siwek a994be9eeb Merge remote-tracking branch 'origin/topic/seth/zeek_init'
* origin/topic/seth/zeek_init:
  Some more testing fixes.
  Update docs and tests for bro_(init|done) -> zeek_(init|done)
  Implement the zeek_init handler.
2019-04-19 11:24:29 -07:00

15 lines
299 B
Text

#
# @TEST-EXEC: bro -b %INPUT >out
# @TEST-EXEC: btest-diff out
event zeek_init()
{
local a = open("testfile");
write_file(a, "this is a test\n");
local b = rotate_file(a);
if ( b$new_name != "testfile" )
print "file rotated";
print file_size(b$new_name);
print file_size("testfile");
}