1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

string: fix trim_right, add tests

This commit is contained in:
Major Taylor
2020-04-06 08:30:25 -04:00
committed by GitHub
parent f59c9133da
commit f099f90f50
2 changed files with 5 additions and 3 deletions

View File

@ -438,6 +438,7 @@ fn test_trim_left() {
// test cutset
s = 'banana'
assert s.trim_left('ba') == 'nana'
assert s.trim_left('ban') == ''
}
fn test_trim_right() {
@ -448,6 +449,7 @@ fn test_trim_right() {
// test cutset
s = 'banana'
assert s.trim_right('na') == 'b'
assert s.trim_right('ban') == ''
}
fn test_all_before() {