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

Add tab completion test for PowerShell #1629

Merged
merged 2 commits into from
Feb 10, 2019
Merged

Conversation

matt9ucci
Copy link
Contributor

Using Pester and AppVeyor. Related to #1623.

Using Pester and AppVeyor.
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thank you.

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm grateful for the test, but the concern I raised would prevent me from approving. The test is just too brittle as it is written.

src/rustup-win-installer/msi/Completion.Tests.ps1 Outdated Show resolved Hide resolved
To avoid over-specify testing.
$result[22].CompletionText | Should Be 'which'

# Keep it simple because over-specify testing might be risky
$result.Count | Should -BeGreaterThan 10
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a "More than 10" type test.

$result.CompletionText | Should -Contain 'uninstall'
$result.CompletionText | Should -Contain 'update'
$result.CompletionText | Should -Contain '--help'
$result.CompletionText | Should -Contain '--verbose'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should -Contain can verify elements of an array ignoring order.

@dwijnand
Copy link
Member

Nice, thanks.

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@nrc nrc merged commit 7ff14e4 into rust-lang:master Feb 10, 2019
@nrc
Copy link
Member

nrc commented Feb 10, 2019

Thank you!

@matt9ucci matt9ucci deleted the pester4cmpl branch February 10, 2019 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants