Files
Nim/tests/js
Zoom 6863b5d289 strutils.split/rsplit now return src on an empty sep (#22136)
This is a rebase of an earlier rejected PR. Following the discussion
around it, this commit provides a valid output for and edge case
of an empty separator for `split` and `rsplit` routines. The empty
separator is interpreted as "split by no separators" and the initial
string is returned. This is consistent with the behaviour of the
`set[char]` version of `split`/`rsplit` routines and unifies them all.

Compared to a commit merged earlier, this one has a benefit of
not using assertions that will be removed in release builds
and thus still not preventing possible infinite loops (which was the
earlier behaviour for this edge case for separator of type `string`).

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
(cherry picked from commit 5e529b3bfa)
2023-09-11 13:52:58 +02:00
..
2018-10-09 19:54:12 +02:00
2020-10-30 03:54:39 +01:00
2020-11-02 10:41:44 +01:00
2018-09-08 10:38:18 +02:00
2019-10-02 21:01:59 +02:00
2020-11-14 12:51:23 +01:00
2020-04-29 20:55:09 +02:00
2020-04-29 20:55:09 +02:00
2020-06-06 09:31:19 +02:00
2021-03-03 11:57:34 +01:00
2021-01-20 11:08:42 +01:00
2020-01-14 16:20:48 +01:00
2017-01-24 16:59:34 +01:00
2020-10-30 09:16:47 +01:00
2015-06-04 12:00:27 +03:00
2018-12-15 22:57:18 +01:00
2016-05-20 16:03:08 +06:00
2020-04-29 20:55:09 +02:00
2020-11-12 09:20:10 +01:00
2015-05-26 16:00:48 +03:00
2021-09-29 09:32:39 +02:00
2020-10-31 12:06:13 +01:00
2018-04-13 23:41:31 +02:00
2020-04-29 20:55:09 +02:00
2020-10-30 09:58:55 +01:00
2018-12-11 21:23:22 +01:00

notes

Prefer moving tests to a non-js directory so that they get tested across all backends automatically. Ideally, tests/js should be reserved to code that only makes sense in js.

Note also that tests for a js specific module (e.g.: std/jsbigints) belong to tests/stdlib, (e.g.: tests/stdlib/tjsbigints.nim)