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

16 lines
323 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");
close(a);
local b = rotate_file_by_name("testfile");
if ( b$new_name != "testfile" )
print "file rotated";
print file_size(b$new_name);
print file_size("testfile");
}