Skip to content

Commit 1c00b0e

Browse files
Migrated TestCompletionPowershellNoDesc from test_completion.py to completion_test.go
1 parent a6b2676 commit 1c00b0e

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

internal/integrationtest/completion/completion_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,13 @@ func TestCompletionFishNoDesc(t *testing.T) {
112112
require.Contains(t, string(stdout), "function __arduino_cli_perform_completion")
113113
require.Contains(t, string(stdout), "__completeNoDesc")
114114
}
115+
116+
func TestCompletionPowershellNoDesc(t *testing.T) {
117+
env, cli := integrationtest.CreateArduinoCLIWithEnvironment(t)
118+
defer env.CleanUp()
119+
120+
stdout, stderr, err := cli.Run("completion", "powershell", "--no-descriptions")
121+
require.Error(t, err)
122+
require.Empty(t, stdout)
123+
require.Contains(t, string(stderr), "Error: command description is not supported by powershell")
124+
}

test/test_completion.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@
1414
# a commercial license, send an email to license@arduino.cc.
1515

1616

17-
def test_completion_powershell_no_desc(run_command):
18-
result = run_command(["completion", "powershell", "--no-descriptions"])
19-
assert not result.ok
20-
assert result.stdout == ""
21-
assert "Error: command description is not supported by powershell" in result.stderr
22-
23-
2417
# test if the completion suggestions returned are meaningful
2518
# we use the __complete hidden command
2619
# https://github.com/spf13/cobra/blob/master/shell_completions.md#debugging

0 commit comments

Comments
 (0)