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

Is there any OR possibility? #21

Open
JuliaRakitina opened this issue Aug 27, 2014 · 1 comment
Open

Is there any OR possibility? #21

JuliaRakitina opened this issue Aug 27, 2014 · 1 comment

Comments

@JuliaRakitina
Copy link

In Expect script I can use OR condition for maybe sent another command or end session.How can I implement it with nexpect?

@tomek-he-him
Copy link

I use .run for such things:

spawn('...').run((_, output) => (
  /option 1/.test(output) || /option 2/.test(output)
));

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

2 participants