zeek/testing/btest/bifs/rotate_file.zeek
Patrick Kelley 8fd444092b initial
2025-05-07 15:35:15 -04:00

16 lines
300 B
Plaintext

#
# @TEST-EXEC: zeek -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");
}