zeek/testing/btest/zeek-aux/zeek-cut/time-fmt.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

26 lines
1 KiB
Text

# @TEST-DOC: Test zeek-cut with time conversion options (-D/-U).
#
# Test -D option.
# @TEST-EXEC: cat ${ZEEK_AUX_LOGS}/conn.log | zeek-cut -D "%H %M %y %m %d" > local-fmt
# @TEST-EXEC: btest-diff local-fmt
# Test -U option.
# @TEST-EXEC: cat ${ZEEK_AUX_LOGS}/conn.log | zeek-cut -U "%H %M %y %m %d" > utc-fmt
# @TEST-EXEC: btest-diff utc-fmt
# Output local time (-D overrides -u).
# @TEST-EXEC: cat ${ZEEK_AUX_LOGS}/conn.log | zeek-cut -u -D "%H %M %y %m %d" > utc-local-fmt
# @TEST-EXEC: btest-diff utc-local-fmt
# Output UTC time, but with format string from -D.
# @TEST-EXEC: cat ${ZEEK_AUX_LOGS}/conn.log | zeek-cut -D "%H %M %y %m %d" -u > local-fmt-utc
# @TEST-EXEC: btest-diff local-fmt-utc
# Output UTC time (-U overrides -d).
# @TEST-EXEC: cat ${ZEEK_AUX_LOGS}/conn.log | zeek-cut -d -U "%H %M %y %m %d" > local-utc-fmt
# @TEST-EXEC: btest-diff local-utc-fmt
# Output local time, but with format string from -U.
# @TEST-EXEC: cat ${ZEEK_AUX_LOGS}/conn.log | zeek-cut -U "%H %M %y %m %d" -d > utc-fmt-local
# @TEST-EXEC: btest-diff utc-fmt-local