zeek/testing/btest/scripts/base/utils/files.test
Jon Siwek 7967a5b0aa General btest cleanup
- Use `-b` most everywhere, it will save time.

- Start some intel tests upon the input file being fully read instead of
  at an arbitrary time.

- Improve termination condition for some sumstats/cluster tests.

- Filter uninteresting output from some supervisor tests.

- Test for `notice_policy.log` is no longer needed.
2020-08-11 11:26:22 -07:00

20 lines
726 B
Text

# @TEST-EXEC: zeek -b -r $TRACES/wikipedia.trace %INPUT >output
# @TEST-EXEC: btest-diff output
@load base/protocols/http
@load base/utils/files
event connection_established(c: connection)
{
print generate_extraction_filename("test-prefix", c, "test-suffix");
print generate_extraction_filename("test-prefix", c, "");
print generate_extraction_filename("", c, "test-suffix");
print generate_extraction_filename("", c, "");
}
event zeek_init()
{
print extract_filename_from_content_disposition("attachment; filename=Economy");
print extract_filename_from_content_disposition("attachment; name=\"US-$ rates\"");
print extract_filename_from_content_disposition("attachment; filename*=iso-8859-1'en'%A3%20rates");
}