Rename Publish-EchoArgs to Publish-PSTestTools
* Rename Publish-EchoArgs to Publish-PSTestTools so it can be used for other tools as well in the future * Publish EchoArgs to the bin directory instead of run to match convention * Add source URL to EchoArgs header comment * Use wildcard of "*.nuget.props" to match "test/csharp/csharp.nuget.props" in .gitignore
This commit is contained in:
parent
7e8070276f
commit
4d5d0a0034
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,12 +1,11 @@
|
|||
bin/
|
||||
obj/
|
||||
run/
|
||||
project.lock.json
|
||||
*-tests.xml
|
||||
/debug/
|
||||
/staging/
|
||||
/Packages/
|
||||
test/csharp/csharp.nuget.props
|
||||
*.nuget.props
|
||||
|
||||
# dotnet cli install/uninstall scripts
|
||||
dotnet-install.ps1
|
||||
|
|
|
@ -547,15 +547,16 @@ function Get-PesterTag {
|
|||
$o
|
||||
}
|
||||
|
||||
function Publish-EchoArgs {
|
||||
function Publish-PSTestTools {
|
||||
[CmdletBinding()]
|
||||
param()
|
||||
|
||||
Find-Dotnet
|
||||
|
||||
# Publish EchoArgs so it can be run by tests
|
||||
Push-Location "$PSScriptRoot/test/tools/EchoArgs"
|
||||
try {
|
||||
dotnet publish --output run
|
||||
dotnet publish --output bin
|
||||
} finally {
|
||||
Pop-Location
|
||||
}
|
||||
|
@ -577,8 +578,7 @@ function Start-PSPester {
|
|||
)
|
||||
|
||||
Write-Verbose "Running pester tests at '$path' with tag '$($Tag -join ''', ''')' and ExcludeTag '$($ExcludeTag -join ''', ''')'" -Verbose
|
||||
# Publish EchoArgs so it can be run by tests
|
||||
Publish-EchoArgs
|
||||
Publish-PSTestTools
|
||||
# All concatenated commands/arguments are suffixed with the delimiter (space)
|
||||
$Command = ""
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ Describe "Native Command Arguments" -tags "CI" {
|
|||
while ($powershellTestDir -notmatch 'test[\\/]powershell$') {
|
||||
$powershellTestDir = Split-Path $powershellTestDir
|
||||
}
|
||||
$echoArgs = Join-Path (Split-Path $powershellTestDir) tools/EchoArgs/run/echoargs
|
||||
$echoArgs = Join-Path (Split-Path $powershellTestDir) tools/EchoArgs/bin/echoargs
|
||||
|
||||
It "Should handle quoted spaces correctly" {
|
||||
$a = 'a"b c"d'
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
//---------------------------------------------------------------------
|
||||
// Author: Keith Hill
|
||||
// Source: https://github.com/Pscx/Pscx/blob/master/Src/EchoArgs/EchoArgs.cs
|
||||
//
|
||||
// Description: Very simple little console class that you can use to see
|
||||
// how PowerShell is passing parameters to legacy console
|
||||
|
|
Loading…
Reference in a new issue