Currently all testing in this crate is done at the unit level. While unit testing is useful for verification of some behavior, integration testing will be necessary to prove we are correctly interacting with the shell.
Can we spin up a bash process within a test, then cause it to trigger a completion script of our making? I believe this would involve a few things:
compiling the completion script we want to test
starting a bash process
adding our completion script binary to the path of our bash process (maybe we can get around this if we put the binary in the same directory we trigger the completion?)
use complete to assign our completion binary to some other command
enter some text and trigger a completion
make assertions in our test about the completions that the shell shows
I am very much open to feedback on the best way to pull this off, even if it means completely moving away from the steps above.
Currently all testing in this crate is done at the unit level. While unit testing is useful for verification of some behavior, integration testing will be necessary to prove we are correctly interacting with the shell.
Can we spin up a bash process within a test, then cause it to trigger a completion script of our making? I believe this would involve a few things:
complete
to assign our completion binary to some other commandI am very much open to feedback on the best way to pull this off, even if it means completely moving away from the steps above.