mirror of https://github.com/01-edu/public.git
Add more edge cases tests to split
This commit is contained in:
parent
2e712343bc
commit
eb2579a9e9
|
@ -9,6 +9,11 @@ const t = (f) => tests.push(f)
|
|||
t(({ eq }) => eq(split('a b c', ' '), ['a', 'b', 'c']))
|
||||
t(({ eq }) => eq(split('ggg - ddd - b', ' - '), ['ggg', 'ddd', 'b']))
|
||||
t(({ eq }) => eq(split('ee,ff,g,', ','), ['ee', 'ff', 'g', '']))
|
||||
t(({ eq }) => eq(split('Riad', ' '), ['Riad']))
|
||||
t(({ eq }) => eq(split('rrrr', 'rr'), ['', '', '']))
|
||||
t(({ eq }) => eq(split('rrirr', 'rr'), ['', 'i', '']))
|
||||
t(({ eq }) => eq(split('Riad', ''), ['R', 'i', 'a', 'd']))
|
||||
t(({ eq }) => eq(split('', 'Riad'), ['']))
|
||||
|
||||
t(() => join(['ee', 'ff', 'g', ''], ',') === 'ee,ff,g,')
|
||||
t(() => join(['ggg', 'ddd', 'b'], ' - ') === 'ggg - ddd - b')
|
||||
|
|
Loading…
Reference in New Issue