added tests for lstrip function

This commit is contained in:
Zeke Medley 2019-02-13 23:19:31 -08:00
parent 0790c1c559
commit f9191d439b
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,5 @@
*www.zeek.org*
*dcab*
**
*https://www.zeek.org*
*dog*

View file

@ -0,0 +1,17 @@
#
# @TEST-EXEC: bro -b %INPUT >out
# @TEST-EXEC: btest-diff out
event bro_init()
{
local link_test = "https://www.zeek.org";
local one_side = "abcdcab";
local nothing = "";
local strange_chars = "ådog";
print fmt("%s", lstrip(link_test, "htps:/"));
print fmt("%s", lstrip(one_side,"abc"));
print fmt("%s", lstrip("","å"));
print fmt("%s", lstrip(link_test,""));
print fmt("%s", lstrip(strange_chars,"å"));
}