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

Fix output for currently set fullname-filter #1893

Merged
merged 1 commit into from
Apr 19, 2021

Conversation

fflaten
Copy link
Collaborator

@fflaten fflaten commented Apr 6, 2021

PR Summary

Fixes broken output for currently set FullName-filter. Caused by a cast to string[][] which seems to be a typo.

Fix #1892

PR Checklist

  • PR has meaningful title
  • Summary describes changes
  • PR is ready to be merged
    • If not, use the arrow next to Create Pull Request to mark it as a draft. PR can be marked Ready for review when it's ready.
  • Tests are added/update (if required)
  • Documentation is updated/added (if required)

@nohwnd
Copy link
Member

nohwnd commented Apr 7, 2021

I think the fullname filter was meant to be an array of fullnames to the test, with possible wildcards. That is @("describe1.describe2.test1", "describe45.context1.test20") so you can copy paste it from the normal output and use it without providing arrays in arrays. This was meant for interactive use and has it's limits, because it might not pin-point just a single test in some cases, but instead should be easier to user interactively.

I think there were tests for this, weird that this typing change does not break any of them, maybe it's because of the way the array is expanded?

@fflaten
Copy link
Collaborator Author

fflaten commented Apr 12, 2021

I think there were tests for this, weird that this typing change does not break any of them, maybe it's because of the way the array is expanded?

Yeah, casting a string-array to [string[][]] places each value in their own inner array. So when we looped this array and performed a string -like Array[1] match later the implicit cast back to string saved us. Pure luck 😄

image

@nohwnd nohwnd added this to the 5.2 milestone Apr 18, 2021
@nohwnd nohwnd merged commit 9994881 into pester:v5.0 Apr 19, 2021
@fflaten fflaten deleted the fix-fullnamefilter-output branch April 19, 2021 09:43
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.

FullName filter discovery output always shows "System.String[]"
2 participants