Skip to content

added test coverage for -notcontains, -is, -isnot operators - #4179

Merged
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:test-operators
Jul 11, 2017
Merged

Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:test-operators

Conversation

@SteveL-MSFT

Copy link
Copy Markdown
Member

-like and -contains already has coverage

Fix #4162

$arr= 'Hello','world'
$arr -contains 'Hello' | Should Be $true
It "Should be <result> for 'Hello','world' <operator> <rhs>" -TestCases @(
@{result = $true; operator = "-contains"; rhs = "'Hello'"},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Test for case sensitive variants? ccontains and cnotcontains? There are some tests below. Can we move them to this It and add it as part of -TestCases array.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll do some general cleanup of the tests

@SteveL-MSFT

Copy link
Copy Markdown
Member Author

Aditya Patwardhan (@adityapatwardhan) addressed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@TravisEz13
Travis Plunk (TravisEz13) merged commit db813b6 into PowerShell:master Jul 11, 2017
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the test-operators branch August 24, 2017 03:02
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
…#4179)

* added test coverage for -notcontains, -is, -isnot operators

* cleaned up tests to use -TestCases, added missing -cnotcontains test
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