* #4458 MSI installer checks that the Windows C Runtime and VS Studio 2015 C++ redistributables are present and returns error message if not.
Includes tests to check that the Wix file contains the download URLs and those URLs are not dead.
* Make invalid arg to -File consistent with -Command
Improve error message if ambiguous arg is passed to -File
* Update powershell console exit codes to match Unix standards
* Enable -WindowStyle to work
Create custom CIM classes (via MOF) and CDXML cmdlets against the new CIM class
Create tests for CRUD operations for CDXML cmdlets
Coverage for Microsoft.PowerShell.Cmdletization namespace is nearly 50%
* update tests to include -TestCase paramater in It block
* Move test functions to appropriate context blocks
* combine skipTest conditions
* move skipTest to Describe block
* correct typo, change to MatchExactly
1. The individual test files (.ps1) in `/test/powershell/engine` are moved to the corresponding subfolders.
2. The test asset file `test/powershell/Common/TestTypeFile.ps1xml` is moved to `test/powershell/Common/engine/Api/assets/` so that it's next to the test that is using the file.
* Clean up ShellExecuteHelper and enable ShellExecute in NativeCommandProcessor
* Minor fix
* [Feature] Fix NativeCommandProcessor to clean up in case an exception is thron
* [Feature] Update tests
* [Feature] Address comments
* address one more comment
* Address some more comments
* [Feature]
Fixed error message using a null resourcemanager
With most recent CoreFx supporting STA, removed special CoreClr code paths
Added test coverage
Removed some dead commented out code that was never used
* [Feature]
merged tests to one file, use runas to have relevant tests run as non-elevated
* [Feature]
Get-CredSSP returns text so only run that test if current culture is en-US
* [Feature] Update test to fix code exclusion
* [Feature] Fix Skipping on test cases that already had a Skip value
* Fix the hang issue in Travis CI build triggered by the [Feature] tag
* [Feature] Update badge only in daily build
* [Feature] Use the term 'daily build'
Fixes#1193 for most scenarios. The remaining scenario to be addressed is the Nano Server bring-up scenario. To continue supporting that scenario, I left the Install-PowerShellRemoting script in place.
This change
1. Ports Enable-PSRemoting and Disable-PSRemoting to PowerShell Core
2. Adds side-by-side PowerShell Core remoting support to the PSSessionConfiguration cmdlets and PSRemoting cmdlets.
3. Ports PSSessionConfiguration tests
This change also introduces a behavioral difference. The PSRemoting and PSSessionConfiguration cmdlets are now context-sensitive and only work for endpoints that match the PowerShell type. For example, Get-PSSessionConfiguration, when running in PowerShell Core, will only return PowerShell Core WinRM endpoints. It will only modify PowerShell Core WinRM endpoints and cannot be used to configure Windows PowerShell endpoints.
* Add more TabCompletion tests
* Minor changes
* Add some more tests
* Add more tab completion tests
* Fix errors
* Add more test coverage
* Add 'AfterEach { Pop-Location }'
* Enable DSC resource name completion and address comments
* use both '/' and '\' in the path for completion
* Use a separate test for '\' and '/'
To improve code clarity and give better error messages when using ValidateRange, you can now specify:
```
[ValidateRange(ValidateRangeKind.Positive)]
```
instead of
```
[ValidateRange(1, 2147483647)]
```
Valid kinds are:
Positive
Negative
NonPostiive
NonNegative
* Add test coverage for Registry (#4148)
* Add coverage for Get-Item, Get-ChildItem, Set-Item, and Clear-Item
* Add test for accessing inaccessible path, per code review.
Using powershell.exe to execute a PowerShell script using -File currently provides no way to pass $true/$false as parameter values. Current behavior is that -File accumulates passed parameters as strings only.
Fix is to special case this based on discussion with PS-Committee to support $true/$false as parsed values to parameters. Switch values is also supported as currently documented syntax doesn't work.
In CI, notepad.exe isn't starting (or starting in time) when using start-process with .txt based on file association.
Since the test is validating opening files by association, fix is to create our own association that is predictable.
On CoreFx, UseShellExecute for Process start is false by default to be cross platform compatible.
In the case of a folder, Process.Start() returns Access Denied as it's not an executable.
On Windows, we can use the ShellExecute path to have explorer open the folder. On Unix, we use `xdg-open` and `open` for Linux and macOS respectively.
- Fix invalid value error message on some properties of ParameterAttribute to point to the specific properties.
- Avoid wrapping argument exception into not a useful 'requires' exception.
This change fixes 3 issues:
- According to [PowerShell Language Specification Version 3.0](https://www.microsoft.com/en-us/download/details.aspx?id=36389), as quoted: "_The result is the (possibly empty) unconstrained 1-dimensional array_", `@(...)` should only return `object[]` array.
- `@([object[]]$null).GetType()` fails with error `"You cannot call a method on a null-valued expression."`
- `@([System.Collections.Generic.List[object]]$null)` fails with error `"Object reference not set to an instance of an object."`
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'ForEach-Object' (alias is '%' or 'foreach')
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Where-Object' (alias is '?' or 'where')
- Fix PSScriptAnalyzer warnings of type PSAvoidUsingCmdletAliases for 'Select-Object' (alias is 'select')
- Fix PSScriptAnalyzer warnings of type PSPossibleIncorrectComparisonWithNull. Essentially, $null has to be on the left-hand side when using it for comparison.
- A Test in ParameterBinding.Tests.ps1 needed adapting as this test used to rely on the wrong null comparison
- Replace a subset of tests of kind '($object -eq $null) | Should Be $true' with '$object | Should Be $null'