zeek/testing/btest/bifs/rotate_file.bro
Jon Siwek 95ffb1cf27 Quick pass over unit tests, adding -b flag to bro so they run faster.
Doing this made bifs/ ~3x faster and language/ ~2x faster.
2012-11-30 17:44:36 -06:00

15 lines
298 B
Text

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