PowerShell/test
James Truher [MSFT] 167a492415
Redirecting to a variable should be possible (#20381)
* add tests

* fix formatting issues

* Make redirection to variable an experimental feature.

Update test to check for experimental feature status.
Set-Variable will still have the -append parameter, but if used when the experimental feature is disabled, a parameter binding error will result.

* Check to be sure provider is not null.

* update to use different FullyQualifiedErrorId

* use Experimental attribute for append parameter rather than runtime check.

* Revert "update to use different FullyQualifiedErrorId"

This reverts commit 8b34af1ac19ecdb821b34534e446ab129830c92f.

* Update src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs

Co-authored-by: Ilya <darpa@yandex.ru>

* Move remediation steps into resource.

Update Set-Variable -Append to be correct when -name and -value are used.
Add tests for the new behavior in Set-Variable.

* Change expected error for contrained language mode and redirection.

* Update src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs

Co-authored-by: Ilya <darpa@yandex.ru>

* Support redirection of native app.

Add tests to validate.

* testexe needs proper case to run on linux.

* Address codefactor issues 01.

* Update src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs

Co-authored-by: Steve Lee <slee@microsoft.com>

* Update src/Microsoft.PowerShell.Commands.Utility/commands/utility/Var.cs

Co-authored-by: Steve Lee <slee@microsoft.com>

* Update src/System.Management.Automation/engine/runtime/Operations/MiscOps.cs

Co-authored-by: Steve Lee <slee@microsoft.com>

---------

Co-authored-by: Ilya <darpa@yandex.ru>
Co-authored-by: Steve Lee <slee@microsoft.com>
2024-06-11 12:42:04 -04:00
..
docker/networktest [StepSecurity] Apply security best practices (#21480) 2024-04-16 21:58:26 +00:00
hosting Update .NET SDK to version 8.0.100-rc.1.23455.8 (#20269) 2023-09-20 14:33:49 -07:00
nanoserver Use correct casing for cmdlet name and cmdlet parameter name in *.ps1 files (#12584) 2020-05-07 17:00:30 +05:00
packaging/windows Remember installation options and used them to initialize options for the next installation (#20420) 2024-05-07 21:45:50 +00:00
perf Bump to .NET 8 RC2 (#20510) 2023-10-18 18:10:25 +00:00
powershell Redirecting to a variable should be possible (#20381) 2024-06-11 12:42:04 -04:00
shebang Use correct casing for cmdlet name and cmdlet parameter name in *.ps1 files (#12584) 2020-05-07 17:00:30 +05:00
SSHRemoting Add the -ConfigurationFile command line parameter to pwsh to support local session configuration (#17447) 2022-06-06 12:12:53 -07:00
tools Add debugging to the MTU size test (#21463) 2024-05-21 13:45:07 -07:00
xUnit Bump XunitXml.TestLogger from 3.1.17 to 3.1.20 (#21207) 2024-02-12 12:02:46 -08:00
README.md Move xUnit tests in new folder (#8356) 2018-12-13 14:22:07 -08:00
Test.Common.props Bump to .NET 9 Preview 1 (#21229) 2024-02-16 03:15:11 +00:00

Testing

The tests are organized by testing language. Thus Pester tests, which are written in the PowerShell language, are in ./powershell and xUnit tests, written in C#, are in ./xUnit. The third-party shebang test is in ./shebang.