mirror of https://github.com/01-edu/public.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
721 B
21 lines
721 B
export const tests = [] |
|
const t = (f) => tests.push(f) |
|
|
|
t(() => sameAmount('hello how are you', /l/, /e/)) |
|
t(() => sameAmount('hello how are you', /h/, /e/)) |
|
t(() => sameAmount('hello how are you', /he/, /ho/)) |
|
|
|
t(() => sameAmount(data, /i/, /p/)) |
|
t(() => !sameAmount(data, /h/, /w/)) |
|
t(() => sameAmount(data, /qqqq /, /qqqqqqq/)) |
|
t(() => !sameAmount(data, /q /, /qqqqqqq/)) |
|
t(() => sameAmount(data, /fs[^q]/, /q /)) |
|
t(() => sameAmount(data, /^[qs]/, /^[gq]/)) |
|
t(() => sameAmount(data, /j/, /w/)) |
|
t(() => !sameAmount(data, /j/, / /)) |
|
t(() => sameAmount(data, /fs./, /jn./)) |
|
|
|
Object.freeze(tests) |
|
|
|
const data = `qqqqqqq q qqqqqqqfsqqqqq q qq qw w wq wqw wqw |
|
ijnjjnfapsdbjnkfsdiqw klfsdjn fs fsdnjnkfsdjnk sfdjn fsp fd`
|
|
|