strings: preserve UTF-8 and boundary invariants
This commit is contained in:
@@ -7,6 +7,7 @@ package strings_test;
|
||||
|
||||
import strings;
|
||||
import os;
|
||||
import test;
|
||||
|
||||
// ref/hare/strings/replace.ha:46 (#4). Hare rows 1-5 (target found
|
||||
// once / multiple times / shorter / longer / multibyte) plus ww rows
|
||||
@@ -108,3 +109,7 @@ import os;
|
||||
};
|
||||
};
|
||||
|
||||
@test fn replace_empty_needle_aborts() void = {
|
||||
test.expectabort();
|
||||
strings.replace("abc", "", "x");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user