test/expr: add more index testing of unicode strings

This commit is contained in:
Roy Ivy III
2022-12-29 22:49:02 -06:00
parent 8e7dbb0bf6
commit be37e033be
+8
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()