diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-09-29 04:05:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-28 16:05:41 -0400 |
commit | 65c2518d5cae79084190dfd9bdfc757572ed2e79 (patch) | |
tree | 96330f14f7d619486f900fc276499b42906e09e1 /tests/stdlib/tstrutils.nim | |
parent | 919a889ba81b882844a90f65fb644bf6266316d7 (diff) | |
download | Nim-65c2518d5cae79084190dfd9bdfc757572ed2e79.tar.gz |
fix #19500; remove find optimization [backport: 1.6] (#19714)
* remove find optimization close #19500 * save find to std * add simple tests * Apply suggestions from code review Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: sandytypical <43030857+xflywind@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Diffstat (limited to 'tests/stdlib/tstrutils.nim')
-rw-r--r-- | tests/stdlib/tstrutils.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/stdlib/tstrutils.nim b/tests/stdlib/tstrutils.nim index 0e6384d7e..32929ef17 100644 --- a/tests/stdlib/tstrutils.nim +++ b/tests/stdlib/tstrutils.nim @@ -868,5 +868,10 @@ bar doAssert nimIdentNormalize("Foo_bar") == "Foobar" doAssert nimIdentNormalize("_Foo_bar") == "_foobar" + block: # bug #19500 + doAssert "abc \0 def".find("def") == 6 + doAssert "abc \0 def".find('d') == 6 + + static: main() main() |