-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Aruba doesn't seem to be able to run commands that accept input using Unix input redirection #573
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. |
@luismadrigal, Does it work if you use |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. |
I've had problems similar to this: When the tested executable checks for stdin, it freezes: it seems to find an open, empty pipe and hangs waiting for input. After I added reading from stdin almost all tests broke. I worked around this by using an ENV variable to turn of reading from stdin for most tests. Where I was testing pipes I continued to get errors until I wrapped the run command in a bash shell: When I run These are ugly workarounds but without them nothing worked anymore. |
In a way this is the correct workaround since Aruba does not emulate a full shell when running commands. Some documentation should be added for this at least. I don't know if we can reliably detect attempts to add input redirection in the command and then warn or abort. |
Summary
I am using Aruba and RSpec to test a CLI. The CLI accepts input files both as arguments and via STDIN.
The Aruba testing framework can perform the first command but does not seem to be able to do the second.
Expected Behavior
The expectation is that both commands should run successfully. I am not sure if this is a bug or an improvement. But I think that since it is a standard way of writing CLIs that the framework for testing them should support it.
All of these should be supported.
Current Behavior
This is the error message that is being displayed.
The expectation is that both commands should run successfully. I am not sure if this is a bug or if am suggesting an improvement.
Possible Solution
Steps to Reproduce (for bugs)
more
can work. )more input.csv
more < input.csv
run( more input.csv)
run(more < input.csv)
Context & Motivation
CLIs are supposed to conform to the POSIX standard and behavior and those are all standard behaviors for most command line apps.
Your Environment
Version used:
aruba (0.14.6)
rspec (3.8.0)
Operating System and version:
MacOS (10.16.2)
Link to your project:
N/A
The text was updated successfully, but these errors were encountered: