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

Better unit tests for bash/zsh completion scripts #906

Closed
remkop opened this issue Dec 23, 2019 · 1 comment
Closed

Better unit tests for bash/zsh completion scripts #906

remkop opened this issue Dec 23, 2019 · 1 comment
Labels
theme: auto-completion An issue or change related to auto-completion theme: codegen An issue or change related to the picocli-codegen module type: enhancement ✨
Milestone

Comments

@remkop
Copy link
Owner

remkop commented Dec 23, 2019

The current unit tests for AutoCompletion test by asserting that the generated script equals some pre-defined script; they don't verify that completion actually works in bash or zsh.

Ideally, the tests would verify that a generated completion script actually generates the expected completion candidates, given some partial input.

Useful links:

(Related to #894 but different)

@remkop remkop added type: enhancement ✨ theme: auto-completion An issue or change related to auto-completion theme: codegen An issue or change related to the picocli-codegen module labels Dec 23, 2019
remkop added a commit that referenced this issue Jan 13, 2020
remkop added a commit that referenced this issue Jan 13, 2020
@remkop remkop added this to the 4.2 milestone Jan 13, 2020
@remkop
Copy link
Owner Author

remkop commented Jan 13, 2020

Work is in progress to create a test suite for interactive tests using the DejaGnu test framework (see also the DejaGnu wikipedia page). DejaGnu is based on Expect (see also the Expect wikipedia page and the Expect man page. Expect in turn is written in TCL.

I will be borrowing quite a lot of code from the bash-completion project, even though that project has started to move its testing to pexpect (a python-based implementation of expect) for unknown reasons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: auto-completion An issue or change related to auto-completion theme: codegen An issue or change related to the picocli-codegen module type: enhancement ✨
Projects
None yet
Development

No branches or pull requests

1 participant