Add error messages to to_count/to_int baselines

This captures error messages produced by `to_count`, but will also
baseline future error messages from `to_int` once we introduce them.
This commit is contained in:
Benjamin Bannier 2025-02-18 09:47:38 +01:00
parent d3a6b93fdb
commit 4c4cd5984c
4 changed files with 12 additions and 7 deletions

View file

@ -0,0 +1,4 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
error in <...>/to_count.zeek, line 8: bad conversion to count (int_to_count(a) and -2)
error in <...>/to_count.zeek, line 20: bad conversion to count (to_count() and )
error in <...>/to_count.zeek, line 22: bad conversion to count (to_count(not a count) and not a count)

View file

@ -0,0 +1 @@
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.

View file

@ -1,6 +1,6 @@
#
# @TEST-EXEC: zeek -b %INPUT >out
# @TEST-EXEC: zeek -b %INPUT 1>out 2>err
# @TEST-EXEC: btest-diff out
# @TEST-EXEC: TEST_DIFF_CANONIFIER=${SCRIPTS}/diff-remove-abspath btest-diff err
event zeek_init()
{
@ -24,12 +24,12 @@ event zeek_init()
local e: port = 123/tcp;
print port_to_count(e);
local origString = "9223372036854775808";
local origString = "9223372036854775808";
local directCount: count = 9223372036854775808;
local fromStringCount: count = to_count(origString);
if ( directCount == fromStringCount )
print fmt("%s and %s are the same", directCount, fromStringCount);
print fmt("%s and %s are the same", directCount, fromStringCount);
else
print fmt("%s and %s are not the same", directCount, fromStringCount);
print fmt("%s and %s are not the same", directCount, fromStringCount);
}

View file

@ -1,6 +1,6 @@
#
# @TEST-EXEC: zeek -b %INPUT >out
# @TEST-EXEC: zeek -b %INPUT 1>out 2>err
# @TEST-EXEC: btest-diff out
# @TEST-EXEC: TEST_DIFF_CANONIFIER=${SCRIPTS}/diff-remove-abspath btest-diff err
event zeek_init()
{