Skip to content

Commit 7aa3356

Browse files
committed
expr: Test ^ at the start of a subpattern
1 parent dabf61c commit 7aa3356

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/by-util/test_expr.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ fn test_regex() {
286286
.args(&["b", ":", "a\\|^b"])
287287
.succeeds()
288288
.stdout_only("1\n");
289+
new_ucmd!()
290+
.args(&["ab", ":", "\\(^a\\)b"])
291+
.succeeds()
292+
.stdout_only("a\n");
289293
new_ucmd!()
290294
.args(&["a$b", ":", "a\\$b"])
291295
.succeeds()

0 commit comments

Comments
 (0)