Skip to content

Conversation

@FidelSch
Copy link
Contributor

Adresses #10320

Added a function to make any necessary translations to input regex in order to make them regex compatible.
Done to translate \| into | for now, but should be easy to add any other cases that come up in the future.

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tty/tty-eof (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Note: The gnu test tests/printf/printf-surprise is now being skipped but was previously passing.

.args(&["-r", "-s", r"[^x]\|x"])
.pipe_in("abc")
.succeeds()
.stdout_contains("cba");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.stdout_contains("cba");
.stdout_is("cba");


// Make the regex flavor compatible with `regex` crate
fn translate_regex_flavor(regex: &str) -> String {
let result: String = regex.replace("\\|", "|");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you only handles \| but BRE has other differences (\(, \), \{, \} for grouping/repetition).
maybe do that now (and add tests)

also unnecessary explicit type annotation

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/seq/seq-epipe is now passing!

@github-actions
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/shuf/shuf-reservoir (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/sort/sort-stale-thread-mem (fails in this run but passes in the 'main' branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants