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

Regex (not)Contains & equals #101

Open
rugk opened this issue Nov 25, 2018 · 6 comments
Open

Regex (not)Contains & equals #101

rugk opened this issue Nov 25, 2018 · 6 comments

Comments

@rugk
Copy link

rugk commented Nov 25, 2018

We now have an assertContains, but what I still miss is a RegEx-version of that, so I can (use case:) do assertContainsRegEx "$archiveList" "^prefix1_" or so and I get check for prefix/suffixes etc.

Also this needs to be flexible enough to check the input per line or globally (RegEx stuff, as usual).

Previously I've just used an assertTrue and a grep for that. This works great.

@rugk rugk changed the title Regex (not)Contains Regex (not)Contains & equals Nov 25, 2018
@rugk
Copy link
Author

rugk commented Nov 25, 2018

Obviously, the same may be done for "equals".

@rolweber
Copy link

Shouldn't that just be assertMatches and assertNotMatches? Tests can put line start and line end markers into the regex to distinguish between contains, equals, startswith, and endswith.

@rugk
Copy link
Author

rugk commented Nov 12, 2019

There is no assertMatches in the code currently, it's also not documented in the Readme.

@rolweber
Copy link

Of course not. But there's no assertContainsRegEx either. I merely suggested a different name.

@rugk
Copy link
Author

rugk commented Nov 12, 2019

Yeah good name. Did misunderstood that…

@paololazzari
Copy link

This would be cool

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

No branches or pull requests

3 participants