1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

test/expr: add more index testing of unicode strings

This commit is contained in:
Roy Ivy III 2022-12-28 02:19:39 -06:00
parent 8e7dbb0bf6
commit be37e033be

View file

@ -108,6 +108,14 @@ fn test_index() {
.args(&["index", "αbcdef", "α"]) .args(&["index", "αbcdef", "α"])
.succeeds() .succeeds()
.stdout_only("1\n"); .stdout_only("1\n");
new_ucmd!()
.args(&["index", "αbc_δef", "δ"])
.succeeds()
.stdout_only("5\n");
new_ucmd!()
.args(&["index", "αbc_δef", "δf"])
.succeeds()
.stdout_only("5\n");
new_ucmd!() new_ucmd!()
.args(&["index", "αbcdef", "fb"]) .args(&["index", "αbcdef", "fb"])
.succeeds() .succeeds()