mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Convert Pester tests to ASCII
Instead of UTF-8 with BOM. Resolves #417.
This commit is contained in:
1 parent
901160cb78
commit
0aaf74bdcc
52 files changed
+648
-517
No files matched your search
@@ -1,33 +1,33 @@
|
||||
Describe "Export-Alias" {
|
||||
$testAliasDirectory = Join-Path -Path $TestDrive -ChildPath ExportAliasTestDirectory
|
||||
$testAliases = "TestAliases"
|
||||
$fulltestpath = Join-Path -Path $($testAliasDirectory) -ChildPath $($testAliases)
|
||||
|
||||
BeforeEach {
|
||||
New-Item -Path $testAliasDirectory -ItemType Directory -Force
|
||||
}
|
||||
|
||||
It "Should be able to create a file in the specified location"{
|
||||
Export-Alias $fulltestpath
|
||||
|
||||
Test-Path $fulltestpath | Should be $true
|
||||
}
|
||||
|
||||
It "Should create a file with the list of aliases that match the expected list" {
|
||||
Export-Alias $fulltestpath
|
||||
|
||||
Test-Path $fulltestpath | Should Be $true
|
||||
|
||||
$actual = Get-Content $fulltestpath | Sort
|
||||
$expected = $(Get-Command -CommandType Alias)
|
||||
|
||||
for ( $i=0; $i -lt $expected.Length; $i++)
|
||||
{
|
||||
# We loop through the expected list and not the other because the output writes some comments to the file.
|
||||
$expected[$i] | Should Match $actual[$i].Name
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Remove-Item -Path $testAliasDirectory -Recurse -Force
|
||||
}
|
||||
Describe "Export-Alias" {
|
||||
$testAliasDirectory = Join-Path -Path $TestDrive -ChildPath ExportAliasTestDirectory
|
||||
$testAliases = "TestAliases"
|
||||
$fulltestpath = Join-Path -Path $($testAliasDirectory) -ChildPath $($testAliases)
|
||||
|
||||
BeforeEach {
|
||||
New-Item -Path $testAliasDirectory -ItemType Directory -Force
|
||||
}
|
||||
|
||||
It "Should be able to create a file in the specified location"{
|
||||
Export-Alias $fulltestpath
|
||||
|
||||
Test-Path $fulltestpath | Should be $true
|
||||
}
|
||||
|
||||
It "Should create a file with the list of aliases that match the expected list" {
|
||||
Export-Alias $fulltestpath
|
||||
|
||||
Test-Path $fulltestpath | Should Be $true
|
||||
|
||||
$actual = Get-Content $fulltestpath | Sort
|
||||
$expected = $(Get-Command -CommandType Alias)
|
||||
|
||||
for ( $i=0; $i -lt $expected.Length; $i++)
|
||||
{
|
||||
# We loop through the expected list and not the other because the output writes some comments to the file.
|
||||
$expected[$i] | Should Match $actual[$i].Name
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Remove-Item -Path $testAliasDirectory -Recurse -Force
|
||||
}
|
||||
Reference in new issue
Block a user