string: update the test

This commit is contained in:
Alexander Medvednikov 2021-01-22 10:33:06 +01:00
parent 216fea1eb3
commit 43d56cb883
2 changed files with 10 additions and 7 deletions

View file

@ -365,16 +365,14 @@ fn test_runes() {
fn test_left_right() {
s := 'ALOHA'
assert s.left(3) == 'ALO'
assert s.left(0) == ''
assert s.left(8) == s
assert s.right(3) == 'HA'
assert s.right(6) == ''
assert s[..3] == 'ALO'
assert s[..0] == ''
assert s[..5] == s
assert s[3..] == 'HA'
//assert s.right(6) == ''
u := s.ustring()
assert u.left(3) == 'ALO'
assert u.left(0) == ''
assert s.left(8) == s
assert u.right(3) == 'HA'
assert u.right(6) == ''
}