zeek/testing/btest/zeek-aux/zeek-cut/time-fmt-env.test
Tim Wojtulewicz d7ba381d12 Adapt zeek-aux btests to zeek structure
This updates Baselines, changes paths to scripts and log files, adds TEST-DOC
annotations, and various other cleanups that make the zeek-aux tests more like
the rest of the zeek tests.
2025-09-11 13:00:53 -07:00

18 lines
856 B
Text

# @TEST-DOC: Test zeek-cut with ZEEK_CUT_TIMEFMT environment variable.
#
# Output local time with format from environment.
# @TEST-EXEC: cat ${ZEEK_AUX_LOGS}/conn.log | ZEEK_CUT_TIMEFMT="%H%M_%y%m%d" zeek-cut -d > env-local
# @TEST-EXEC: btest-diff env-local
# Output UTC with format from environment.
# @TEST-EXEC: cat ${ZEEK_AUX_LOGS}/conn.log | ZEEK_CUT_TIMEFMT="%H%M_%y%m%d" zeek-cut -u > env-utc
# @TEST-EXEC: btest-diff env-utc
# The "-D" option overrides environment variable.
# @TEST-EXEC: cat ${ZEEK_AUX_LOGS}/conn.log | ZEEK_CUT_TIMEFMT="%H%M_%y%m%d" zeek-cut -D "%H %M %y %m %d" > env-local-fmt
# @TEST-EXEC: btest-diff env-local-fmt
# The "-U" option overrides environment variable.
# @TEST-EXEC: cat ${ZEEK_AUX_LOGS}/conn.log | ZEEK_CUT_TIMEFMT="%H%M_%y%m%d" zeek-cut -U "%H %M %y %m %d" > env-utc-fmt
# @TEST-EXEC: btest-diff env-utc-fmt