Skip to content
Myr

✅ Extend completion unit tests for zsh, powershell and pwsh (#1767)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Aditya Raj · committed by GitHub · parent 4e39eb7 · Browse files · 1 file+18 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: svlandeg <sofie.vanlandeghem@gmail.com>

Diff stats

1 file+18 added−0 removed

  • tests:+18 added−0 removed

1 file+18 added−0 removed

modified:tests/test_completion/test_completion_option_colon.py+18 added
76 unmodified lines
77 "_TYPER_COMPLETE_ARGS": "colon_example.py --name ",78 },79 )80 assert "alpine\\\\:hello" in result.stdout81 assert "fake image\\\\: for testing" in result.stdout82 assert "alpine\\\\:latest" in result.stdout83 assert "latest alpine image" in result.stdout84 assert "nvidia/cuda\\\\:10.0-devel-ubuntu18.04" in result.stdout858687def test_completion_colon_zsh_partial():
7 unmodified lines
95 "_TYPER_COMPLETE_ARGS": "colon_example.py --name alpine",96 },97 )98 assert "alpine\\\\:hello" in result.stdout99 assert "fake image\\\\: for testing" in result.stdout100 assert "alpine\\\\:latest" in result.stdout101 assert "latest alpine image" in result.stdout102 assert "nvidia/cuda\\\\:10.0-devel-ubuntu18.04" not in result.stdout103104105def test_completion_colon_zsh_single():
7 unmodified lines
113 "_TYPER_COMPLETE_ARGS": "colon_example.py --name alpine:hell",114 },115 )116 assert "alpine\\\\:hello" in result.stdout117 assert "fake image\\\\: for testing" in result.stdout118 assert "alpine\\\\:latest" not in result.stdout119 assert "latest alpine image" not in result.stdout120 assert "nvidia/cuda\\\\:10.0-devel-ubuntu18.04" not in result.stdout121122123def test_completion_colon_powershell_all():
8 unmodified lines
132 "_TYPER_COMPLETE_WORD_TO_COMPLETE": "",133 },134 )135 assert "alpine:hello" in result.stdout136 assert "fake image: for testing" in result.stdout137 assert "alpine:latest" in result.stdout138 assert "latest alpine image" in result.stdout139 assert "nvidia/cuda:10.0-devel-ubuntu18.04" in result.stdout140141142def test_completion_colon_powershell_partial():
8 unmodified lines
151 "_TYPER_COMPLETE_WORD_TO_COMPLETE": "alpine",152 },153 )154 assert "alpine:hello" in result.stdout155 assert "fake image: for testing" in result.stdout156 assert "alpine:latest" in result.stdout157 assert "latest alpine image" in result.stdout158 assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout159160161def test_completion_colon_powershell_single():
8 unmodified lines
170 "_TYPER_COMPLETE_WORD_TO_COMPLETE": "alpine:hell",171 },172 )173 assert "alpine:hello" in result.stdout174 assert "fake image: for testing" in result.stdout175 assert "alpine:latest" not in result.stdout176 assert "latest alpine image" not in result.stdout177 assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout178179180def test_completion_colon_pwsh_all():
8 unmodified lines
189 },190 )191192 assert "alpine:hello" in result.stdout193 assert "fake image: for testing" in result.stdout194 assert "alpine:latest" in result.stdout195 assert "latest alpine image" in result.stdout196 assert "nvidia/cuda:10.0-devel-ubuntu18.04" in result.stdout197198199def test_completion_colon_pwsh_partial():
8 unmodified lines
208 "_TYPER_COMPLETE_WORD_TO_COMPLETE": "alpine",209 },210 )211 assert "alpine:hello" in result.stdout212 assert "fake image: for testing" in result.stdout213 assert "alpine:latest" in result.stdout214 assert "latest alpine image" in result.stdout215 assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout216217218def test_completion_colon_pwsh_single():
8 unmodified lines
227 "_TYPER_COMPLETE_WORD_TO_COMPLETE": "alpine:hell",228 },229 )230 assert "alpine:hello" in result.stdout231 assert "fake image: for testing" in result.stdout232 assert "alpine:latest" not in result.stdout233 assert "latest alpine image" not in result.stdout234 assert "nvidia/cuda:10.0-devel-ubuntu18.04" not in result.stdout235236237# TODO: tests for complete_fish