zeek/testing/btest/bifs/rotate_file.bro
2012-05-30 16:30:50 -05:00

15 lines
295 B
Text

#
# @TEST-EXEC: bro %INPUT >out
# @TEST-EXEC: btest-diff out
event bro_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");
}