diff --git a/debug.sh b/debug.sh index 2aa16b9c1..57b09b66c 100755 --- a/debug.sh +++ b/debug.sh @@ -1,2 +1,2 @@ -export CORE_ROOT=$(pwd)/bin TEMP=/tmp +export CORE_ROOT=$(pwd)/bin lldb-3.6 -o "plugin load ./bin/libsosplugin.so" -- ./powershell $@ diff --git a/ext-src/pester b/ext-src/pester index dbf0de609..3cd86e7ca 160000 --- a/ext-src/pester +++ b/ext-src/pester @@ -1 +1 @@ -Subproject commit dbf0de609b9b025cf96c636fa7474867ede82aeb +Subproject commit 3cd86e7caa427368a717fbcc17e37d648af3d921 diff --git a/run.sh b/run.sh index 1c3df118c..597a39195 100755 --- a/run.sh +++ b/run.sh @@ -1,4 +1,4 @@ -export CORE_ROOT=$(pwd)/bin TEMP=/tmp +export CORE_ROOT=$(pwd)/bin ./powershell $@ # Fix tty due to possible bug in .NET stty echo diff --git a/src/pester-tests/Export-Alias.Tests.ps1 b/src/pester-tests/Export-Alias.Tests.ps1 index c24d5fb63..632df20f8 100644 --- a/src/pester-tests/Export-Alias.Tests.ps1 +++ b/src/pester-tests/Export-Alias.Tests.ps1 @@ -1,7 +1,10 @@ -Describe "Export-Alias" { - $testAliasDirectory = $env:TEMP + "/ExportAliasTestDirectory" +$here = Split-Path -Parent $MyInvocation.MyCommand.Path +. $here/Test-Common.ps1 + +Describe "Export-Alias" { + $testAliasDirectory = "$(GetTempDir)/ExportAliasTestDirectory" $testAliases = "TestAliases" - $fulltestpath = $testAliasDirectory + "/" + $testAliases + $fulltestpath = "$($testAliasDirectory)/$($testAliases)" BeforeEach { New-Item -Path $testAliasDirectory -ItemType Directory -Force @@ -31,4 +34,4 @@ } Remove-Item -Path $testAliasDirectory -Recurse -Force -} \ No newline at end of file +} diff --git a/src/pester-tests/Measure-Object.Tests.ps1 b/src/pester-tests/Measure-Object.Tests.ps1 index 4f9085a96..7d6205ee6 100644 --- a/src/pester-tests/Measure-Object.Tests.ps1 +++ b/src/pester-tests/Measure-Object.Tests.ps1 @@ -126,7 +126,7 @@ } Context "String tests" { - if ($env:TEMP -eq "/tmp") + if ($true) # TODO: test if Windows or Linux { $nl = "`n" } diff --git a/src/pester-tests/Start-Process.Tests.ps1 b/src/pester-tests/Start-Process.Tests.ps1 index 5f3d5820f..983b813ad 100644 --- a/src/pester-tests/Start-Process.Tests.ps1 +++ b/src/pester-tests/Start-Process.Tests.ps1 @@ -4,8 +4,7 @@ Describe "Start-Process" { $pingCommand = (Get-Command -CommandType Application ping)[0].Definition $pingDirectory = Split-Path $pingCommand -Parent - $tempDir = GetTempDir - $tempFile = $tempDir + "PSTest" + $tempFile = "$(GetTempDir)/PSTest" $assetsFile = $here + "/assets/SortTest.txt" $windows = IsWindows if ($windows) diff --git a/src/pester-tests/Test-Common.ps1 b/src/pester-tests/Test-Common.ps1 index 8731cdbed..2e968cbaf 100644 --- a/src/pester-tests/Test-Common.ps1 +++ b/src/pester-tests/Test-Common.ps1 @@ -16,7 +16,7 @@ Function GetTempDir } else { - return "/tmp/" + return "/tmp" } }