Pester
Pester copied to clipboard
Add FreeBSD support
PR Summary
- Adds platform detection support for FreeBSD
- Adds a FreeBSD test
- Updates a few existing tests to be executed under FreeBSD
PR Checklist
- [x] PR has meaningful title
- [x] Summary describes changes
- [ ] PR is ready to be merged
- [x] Tests are added/update (if required)
- [ ] Documentation is updated/added (if required)
A few notes
- This PR should not be merged until https://github.com/PowerShell/PowerShell-Native/pull/92 and https://github.com/PowerShell/PowerShell/pull/20041 are merged. The first fixes the build and test issues of the native library PS uses so it works under FreeBSD the second one adds build and operation support to PS under FreeBSD
- FreeBSD has a platform in dotNET and community support for building/using it.
- Tests were executed against my fork (pending PR) of Powershell port for FreeBSD (https://github.com/Thefrank/PowerShell/tree/freebsd). build
./build.ps1 -Clean -Inline. test:Import-Module .\bin\Pester.psd1 -Forcethen./test.ps1 -CI -PassThru -NoBuild- Two tests report a single failure:
Pester.RSpec.InNewProcess.ts.ps1andPester.RSpec.Output.ts.ps1- RSpec.InNewProcess:
Keeps original exit code from Invoke-Pesterfails returning a "Check the spelling" instead of the expectedExitCode=2 - RSpec.Output:
Multiline string has ansi style at start of every line and reset at end of last linefails returning a'\Hello World\' is not recognized as a name of a cmdlet
- RSpec.InNewProcess:
- Two tests report a single failure:
LGTM so far.
@Thefrank this is still a draft, do you have plans to finish this? Closing for now, let me know if you want to continue.
Sorry about leaving this open for so long!
It is stalled upstream from the two listed PRs. I will reopen/remake this if the required support is merged.