dotnet / command-line-api

Command line parsing, invocation, and rendering of terminal output.
https://github.com/dotnet/command-line-api/wiki
MIT License
3.37k stars 378 forks source link

add integration tests for dotnet-suggest shell shim scripts #293

Open jonsequitur opened 5 years ago

wli3 commented 5 years ago

The only solution I can think of now is to boot up a docker. But

  1. Only one layer of docker is allowed. And build will have a dependency on docker.
  2. Even after the docker is boot up, how to pass a to docker terminal programmatically?
wli3 commented 5 years ago

All dependency are, bash shell, published "end to end app" and dotnet-suggest. Maybe a folder and setting path are enough. It would be funny to run in C# tho. In this case, C# code are all test runner. And these c# code need xunit test runner to run, so 2 layers of test runner.

wli3 commented 5 years ago

FYI if you want to read compgen and complete source code here is a link to a mirror https://github.com/mfragkoulis/bash-sgsh/blob/master/builtins/complete.def

omajid commented 5 years ago

Not sure if this helps, but I wrote up some code a while ago to programtically get completions for a command: https://github.com/redhat-developer/dotnet-bunny/blob/master/get-completions.sh. Usage:

./get-completions.sh dotnet p
pack publish

It does need the completion installed system-wide, though, which is why I suppose a container (or another isolated environment) might be handy.

wli3 commented 5 years ago

Thanks! Let me see what i can do with it