`Compiler.LoadModule` assumes that when `ps.HadErrors == true` the error stream is not empty. However, when `SilentlyContinue` is specified as the error action, the non-terminating error is not kept in `ErrorOutputPipe` of the cmdlet and thus does not appear in `ps.Streams.Error`. So when `ps.HadErrors == true` while `ps.Streams.Error` is empty, it suggests it's OK to ignore the errors because they are explicitly suppressed with `SilentlyContinue` error action.
So in my opinion, the expected behavior of `"using module .\mod.psm1"` in this case should be successful as if `ps.HaddErrors` is false.
This change removes the call to `ContentHelper.GetEncoding` since it's logic for returning a default encoding when a ContentType header is not found disables subsequent checks for meta charset definitions.
All variations of the Invoke-WebRequest tests have been mirrored for Invoke-RestMethod. Verbose output is used to verify the encoding since Invoke-RestMethod returns the JSON content directly instead of a response object. (See ExecuteRestMethod)
Introduce new test module 'WebListener.psm1'.
Now web HTTPS tests can use it to exclude using external sites.
PowerShell/PowerShell#4609
* [Feature] Add Tests for Web Cmdlet Certificate Authentication
PowerShell/PowerShell#4609
* [feature] Add new app to Publish-PSTestTools refactor tests
also add ASP.NET to .spelling
* [feature] spelling fix
* [feature] revert badssl changes
* [feature] Impliment suggestions
* [feature] Spelling, var rename, port 8443 to 8083
rebase fix conflict
* [feature] Rename to HttpsListener and Module-ize
.
* [feature] password protect ClientCert to fix macOS import issue
* [feature] Rename to WebListener
* Rename HttpsListener to WebListener
* Switch Listener from Razor pages to MVC
* Address PR feedback
* Adjust tests
* [feature] Address PR feedback
* [feature] Replace missing smeicolons
* [feature] Address PR Feedback
* [feature] Cleanup and minor fix
* Enum was not used
* GetStatus() was not accessing the correct property chain
* Added -Test param to make URL generation smoother in test code and to fix double / issues
* [feature] More minor fixes
* Https when it matters.
* Expand property... not exclude..
* Remove superfluous and outdated ToString() override
* [Feature] Move ClientCeret.pfx to WebListener Module
* Move the cert
* Adjust Get-WebListenerClientCertificate
* Remove cert from csproj
* ActionResult -> JsonResult (was mistakenly left as ActionResult during testing)..
* [Feature] Move ServerCert.pfx to Module
* Move cert
* Upate csproj
* Update module
* Add/Update README.md's
CI Retest.
* AlternateStreams support relies on pinvoke to win32 APIs which don't work on non-Windows and produces errors about not loading a DLL in the case of copy-item
* Address PR feedback, remove -Stream parameter for Unix added new -stream tests
* if/def out alternate stream syntax checks not applicable to Unix
GetMember/SetMember/InvokeMember operations on a COM object will generate code to unwrap the COM object if it's wrapped in PSObject. Due to a loose restriction, if you have a string wrapped to a PSObject with an ETS member of the same name, then the string PSObject will be unwrapped too and the ETS member will be lost. The fix is to use a more restricted rule by checking if the base object is a COM object.
* #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.