-
Notifications
You must be signed in to change notification settings - Fork 19
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
Unexpected Failure When Replacing Variable #170
Comments
Yes, newlines are not supported in substitutions. If nothing else, we should assert if the user provides one. Processing is done on a per line basis. This helps with our multi-line glob and with allowing matching literal ones as well as ones with variables. I didn't quite catch, what is the case you are needing a newline for? |
Ah that makes more sense. Thank you. As for why... Since we don't know exactly what the output is from We could definitely handle it on our own with custom logic (see this PR for a very bad attempt at my own custom logic), but I'd rather use this excellent tool if possible. |
I'll probably just use |
Summary
While trying to use
insert_var
to replace data forcargo --help
's output, in order to add UI testing to cross for our integrationg tests, I noticed that I was unable to useinsert_var
to actually replace data for very specific corner cases. Here's a sample project reproducing the failing test case. The minimum, failing example test string is:Detailed Information
The test case uses:
And the test script is:
Where
main.rs
is:It will fail with the following output:
Note that all of the following actually work:
It seems to require the following regex pattern:
'.*\n.*:
. If the newline is not present, everything works as expected.Original Use
The original failing output, and what we were originally trying to match, is as follows:
The text was updated successfully, but these errors were encountered: