Skip to content

Add tests for overloads changed in .Net #1

@S-dn-Y

Description

@S-dn-Y

Hi!

Great initiative, I can see this get added into our pipeline!
It needs some more tests though..
With the .NET changes that come with PowerShell 7 some overloads where changed/added as well, which may impact PowerShell scripts that utilize them.

For example:
This will split in PowerShell 5:

PS C:\> [string]$PSVersionTable['PSVersion']
5.1.20348.2849
PS C:\> 'SomeExampleExampleExample'.Split('ex')
Som
E
ampl
E
ampl
E
ampl

But not in PowerShell 7 cause a different overload is hit:

PS C:\> [string]$PSVersionTable['PSVersion']
7.4.5
PS C:\> 'SomeExampleExampleExample'.Split('ex')
SomeExampleExampleExample
PS C:\>

While I was working on migrating our code base I've tried to search for a big list of these changes but wasn't quite successful. Split is one I know changed, but there may be others.

Best regards,
Sidney

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions