Fix tests in to_count to reflect appropriate function; add tests for 0x-formatted hex values for to_count and to_int

This commit is contained in:
Mark Overholser 2025-02-23 16:19:12 -06:00
parent 7b0e259655
commit 8fce9c34f8
2 changed files with 5 additions and 3 deletions

View file

@ -19,9 +19,10 @@ event zeek_init()
print to_count("7"); print to_count("7");
print to_count(""); print to_count("");
print to_count("-5"); print to_count("-5");
print to_int("10101100", 2); print to_count("10101100", 2);
print to_int("43", 8); print to_count("43", 8);
print to_int("C3", 16); print to_count("C3", 16);
print to_count("0xC3", 16);
print to_count("not a count"); print to_count("not a count");
local e: port = 123/tcp; local e: port = 123/tcp;

View file

@ -9,6 +9,7 @@ event zeek_init()
print to_int("10111100", 2); print to_int("10111100", 2);
print to_int("47", 8); print to_int("47", 8);
print to_int("F3", 16); print to_int("F3", 16);
print to_int("0xF3", 16);
print to_int("4294967296"); print to_int("4294967296");
print to_int("not an int"); print to_int("not an int");