mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
added tests for lstrip function
This commit is contained in:
parent
0790c1c559
commit
f9191d439b
2 changed files with 22 additions and 0 deletions
5
testing/btest/Baseline/language.lstrip/out
Normal file
5
testing/btest/Baseline/language.lstrip/out
Normal file
|
@ -0,0 +1,5 @@
|
|||
*www.zeek.org*
|
||||
*dcab*
|
||||
**
|
||||
*https://www.zeek.org*
|
||||
*dog*
|
17
testing/btest/language/lstrip.bro
Normal file
17
testing/btest/language/lstrip.bro
Normal 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,"å"));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue