mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
FileAnalysis: unit test tweaks (portability, etc.)
This commit is contained in:
parent
dce3e6448f
commit
7caa4aa45c
7 changed files with 15 additions and 11 deletions
|
@ -2,4 +2,5 @@
|
|||
#
|
||||
# Default canonifier used with the tests in testing/btest/*.
|
||||
|
||||
`dirname $0`/diff-remove-timestamps
|
||||
`dirname $0`/diff-remove-timestamps \
|
||||
| `dirname $0`/diff-remove-mime-types
|
||||
|
|
|
@ -76,13 +76,16 @@ hook FileAnalysis::policy(trig: FileAnalysis::Trigger, info: FileAnalysis::Info)
|
|||
for ( act in info$actions )
|
||||
switch ( act$act ) {
|
||||
case FileAnalysis::ACTION_MD5:
|
||||
print fmt("MD5: %s", info$actions[act]$md5);
|
||||
if ( info$actions[act]?$md5 )
|
||||
print fmt("MD5: %s", info$actions[act]$md5);
|
||||
break;
|
||||
case FileAnalysis::ACTION_SHA1:
|
||||
print fmt("SHA1: %s", info$actions[act]$sha1);
|
||||
if ( info$actions[act]?$sha1 )
|
||||
print fmt("SHA1: %s", info$actions[act]$sha1);
|
||||
break;
|
||||
case FileAnalysis::ACTION_SHA256:
|
||||
print fmt("SHA256: %s", info$actions[act]$sha256);
|
||||
if ( info$actions[act]?$sha256 )
|
||||
print fmt("SHA256: %s", info$actions[act]$sha256);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue