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

support storing intermediate variables between tests #28

Open
ppenguin opened this issue Feb 11, 2021 · 0 comments
Open

support storing intermediate variables between tests #28

ppenguin opened this issue Feb 11, 2021 · 0 comments
Labels

Comments

@ppenguin
Copy link

I'm doing a test which needs to take the output of one command as an input for the next.
Short of using temporary files I have no way of achieving this within the test script.

It would be a nice feature, if we could e.g. refer to (ideally a regex match) of stdout (or stderr) of the last command, or support pushing such a match to a variable name.

Maybe something like:

$ myapicli --getsession
> /([0-9]*)/sid=$1
>= 0

$ myapicli --getitem --sid=${sid}
> /\w+/
>= 0

Even better if one could do multiple matching groups like so:

> /([0-9]*)\s+([0-9]*)/num1=$1;num2=$2
# or with some separator or different assignment of course
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants