Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expr: Add tests #7356

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

expr: Add tests #7356

wants to merge 2 commits into from

Conversation

RenjiSann
Copy link
Collaborator

I've rewritten all the GNU testcases of gnu/tests/expr/expr.pl in our testsuite, to more easily track potential regressions.

Sadly, the remaining issues are all caused by our regex dependency (rust-onig) which has a diverging behavior from GNU. This emphasizes the need to find another regex engine, as discussed in #1145

@@ -1834,6 +1834,14 @@ impl UCommand {
cmd_result
}

#[track_caller]
pub fn fails_with_code(&mut self, expected_code: i32) -> CmdResult {
Copy link
Contributor

Choose a reason for hiding this comment

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

why this function?
you can do
.fails().code_is(1)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I find it to be faster to write (it only takes 1 LSP completion, which loads in 3-4 seconds on my machine), and takes 1 line less after formatting.
Considering the fact I had to replicate it around 30 times last evening, I thought it was worth adding, but obviously that's not a strong requirement.

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