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

14 lines
248 B
V
Raw Normal View History

fn test_repeat() {
r1 := `V`
r2 := `👋`
assert r1.repeat(5) == 'VVVVV'
assert r2.repeat(5) == '👋👋👋👋👋'
assert r1.repeat(1) == r1.str()
assert r2.repeat(1) == r2.str()
assert r1.repeat(0) == ''
assert r2.repeat(0) == ''
}