mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
expr: Handle special cases for $
in regex
Enable fixed test `test_bre11`
This commit is contained in:
parent
f664578a4b
commit
29332865a9
2 changed files with 34 additions and 4 deletions
|
@ -294,6 +294,14 @@ fn test_regex() {
|
|||
.args(&["a$b", ":", "a\\$b"])
|
||||
.succeeds()
|
||||
.stdout_only("3\n");
|
||||
new_ucmd!()
|
||||
.args(&["a", ":", "a$\\|b"])
|
||||
.succeeds()
|
||||
.stdout_only("1\n");
|
||||
new_ucmd!()
|
||||
.args(&["ab", ":", "a\\(b$\\)"])
|
||||
.succeeds()
|
||||
.stdout_only("b\n");
|
||||
new_ucmd!()
|
||||
.args(&["abc", ":", "^abc"])
|
||||
.succeeds()
|
||||
|
@ -306,6 +314,10 @@ fn test_regex() {
|
|||
.args(&["b^$ic", ":", "b^\\$ic"])
|
||||
.succeeds()
|
||||
.stdout_only("5\n");
|
||||
new_ucmd!()
|
||||
.args(&["a$c", ":", "a$\\c"])
|
||||
.succeeds()
|
||||
.stdout_only("3\n");
|
||||
new_ucmd!()
|
||||
.args(&["^^^^^^^^^", ":", "^^^"])
|
||||
.succeeds()
|
||||
|
@ -774,7 +786,6 @@ mod gnu_expr {
|
|||
.stdout_only("3\n");
|
||||
}
|
||||
|
||||
#[ignore]
|
||||
#[test]
|
||||
fn test_bre11() {
|
||||
new_ucmd!()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue