mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
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:
parent
7b0e259655
commit
8fce9c34f8
2 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||||
|
|
|
@ -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");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue