Skip to content

Feature request: a way to programmatically test the completions #327

Answered by pacak
VorpalBlade asked this question in Q&A
Discussion options

You must be logged in to vote

First you can take a look at completion tests - they are using public API only. set_comp with revision 0 generates some textual shell agnostic representation for completion bpaf would generate. 0th revision is something I consider to be public API and not planning to remove or change. If you want to test your part of the completion without running the binary - that's where I would start.

Then there's comtester crate. You'll probably have to clone it and add to your repo in some way, but it can configure the completion environment, run each command line in a separate shell and collect the results. You'll have to make sure shells you want to test on are available. I'm planning to make chang…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pacak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #312 on December 21, 2023 16:26.