btest/decode_base_errors: Avoid binary output in baseline

Zeek prints the input string verbatim to the terminal and that's
upsetting btest just on Alpine.
This commit is contained in:
Arne Welzel 2023-02-02 18:46:20 +01:00
parent 622074108b
commit 4ac65ce8ca
2 changed files with 3 additions and 10 deletions

View file

@ -1,7 +1,3 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63. ### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
error: character 94 ignored by Base64 decoding error: character 94 ignored by Base64 decoding
error: error in decoding string ^#@!@##$!===
error: character 237 ignored by Base64 decoding error: character 237 ignored by Base64 decoding
error: error in decoding string íîï===
PASS
PASS

View file

@ -1,11 +1,8 @@
# @TEST-EXEC: zeek -b %INPUT >out 2>&1 # @TEST-EXEC: zeek -b %INPUT >out 2>&1
# @TEST-EXEC: btest-diff out # @TEST-EXEC: TEST_DIFF_CANONIFIER='grep character.*ignored' btest-diff out
event zeek_init() event zeek_init()
{ {
local r1 = decode_base64("^#@!@##$!==="); decode_base64("^#@!@##$!===");
print |r1| > 0 ? "FAIL" : "PASS"; decode_base64("\xed\xee\xef===");
local r2 = decode_base64("\xed\xee\xef===");
print |r2| > 0 ? "FAIL" : "PASS";
} }