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:
@ -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() {
|
||||
|
Reference in New Issue
Block a user