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:
Douglas Thrift committed 2016-09-13 13:37:42 -07:00
1 parent 7e8070276f
commit 4d5d0a0034
4 files changed
+7 -7

No files matched your search

+1 -2
View File
@@ -1,12 +1,11 @@
bin/ bin/
obj/ obj/
run/
project.lock.json project.lock.json
*-tests.xml *-tests.xml
/debug/ /debug/
/staging/ /staging/
/Packages/ /Packages/
test/csharp/csharp.nuget.props *.nuget.props
# dotnet cli install/uninstall scripts # dotnet cli install/uninstall scripts
dotnet-install.ps1 dotnet-install.ps1
+4 -4
View File
@@ -547,15 +547,16 @@ function Get-PesterTag {
$o $o
} }
function Publish-EchoArgs { function Publish-PSTestTools {
[CmdletBinding()] [CmdletBinding()]
param() param()
Find-Dotnet Find-Dotnet
# Publish EchoArgs so it can be run by tests
Push-Location "$PSScriptRoot/test/tools/EchoArgs" Push-Location "$PSScriptRoot/test/tools/EchoArgs"
try { try {
dotnet publish --output run dotnet publish --output bin
} finally { } finally {
Pop-Location 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 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-PSTestTools
Publish-EchoArgs
# All concatenated commands/arguments are suffixed with the delimiter (space) # All concatenated commands/arguments are suffixed with the delimiter (space)
$Command = "" $Command = ""
@@ -4,7 +4,7 @@ Describe "Native Command Arguments" -tags "CI" {
while ($powershellTestDir -notmatch 'test[\\/]powershell$') { while ($powershellTestDir -notmatch 'test[\\/]powershell$') {
$powershellTestDir = Split-Path $powershellTestDir $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" { It "Should handle quoted spaces correctly" {
$a = 'a"b c"d' $a = 'a"b c"d'
+1
View File
@@ -1,5 +1,6 @@
//--------------------------------------------------------------------- //---------------------------------------------------------------------
// Author: Keith Hill // 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 // Description: Very simple little console class that you can use to see
// how PowerShell is passing parameters to legacy console // how PowerShell is passing parameters to legacy console