We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Raising as an idea for discussion, because I plan to implement this locally first of all.
Consider:
go test env time='\d(\.\d+)?' cmpregex stdout out.golden -- out.golden -- $$ go test Hello, world... from the test! PASS ok _/home/gopher ${time}s
Would succeed when matched against:
$ go test Hello, world... from the test! PASS ok _/home/gopher 0.042s
cmpregex is similar to cmpenv, except that it treats $ variable values as a regular expression (with the exception of $$ which expands to $).
cmpregex
cmpenv
$
$$
Comparison of the arguments to cmpregex then proceeds as follows:
This may or may not belong in the standard library of functions that come with testscript.
testscript
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Raising as an idea for discussion, because I plan to implement this locally first of all.
Consider:
Would succeed when matched against:
cmpregex
is similar tocmpenv
, except that it treats$
variable values as a regular expression (with the exception of$$
which expands to$
).Comparison of the arguments to
cmpregex
then proceeds as follows:$$
expanded to$
$
variables to give the parts of the input$
actually expands to a regular expression that compiles$
-specified regular expression or fail$
-specified regular expressions have been visited and/or the comparison has been consumedThis may or may not belong in the standard library of functions that come with
testscript
.The text was updated successfully, but these errors were encountered: