JoshMcguigan / JoshMcguigan/shell_completion

integration testing

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
Rust
Stars
135
Forks
5
PR merge metrics
No merged PRs in 30d

Description

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:

1. compiling the completion script we want to test
2. starting a bash process
3. 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?)
4. use `complete` to assign our completion binary to some other command
5. enter some text and trigger a completion
6. 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.