Skip to content

Test fail because sort and ls aliases are used in Tests #53

@dbroeglin

Description

@dbroeglin

Expected Behavior

Tests should run cross platform as long as no Windows specific behavior is tested.

Current Behavior

Tests fail on MacOSX.
The reason is documented here: PowerShell/PowerShell#827 Some aliases have been removed on Mac and Linux to avoid conflicts with native command names.

Possible Solution

Use full cmdlet names instead of aliases. Which is encouraged anyway when writing scripts or modules.

Steps to Reproduce (for bugs)

Invoke-Pester 

Context

I historically work on a Mac, using Windows VMs when doing PowerShell. I tried out the powershell package available on mac.

I always rerun tests on a Windows environment before pushing changes but it is convenient to be able to directly develop on the Mac.

BTW, executing the build fails because PSake is doing quite a bit of Windows specific initialization, looking for .Net framework in windir, looking into the registry, etc. Which is weird for a build tool. But Invoke-Pester works. Do you think that the just running Invoke-Pester behavior could be conserved in the future ? If it is not too much work it would be nice to be able to run the tests and the module on a Mac.

Your Environment

  • Module version used: Latest dev branch (7a7afee)
  • Operating System and PowerShell version: MacOSX, PS Core 6.x
Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.11
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions