Skip to content

Commit 758e0d6

Browse files
committed
...
1 parent a4db44f commit 758e0d6

6 files changed

Lines changed: 12 additions & 12 deletions

tests/ArchiveCompressionExpansionCommands.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Describe 'Archive Compression & Expansion Commands' -Tag 'Archive Compression &
1818
$destName = 'CompressArchiveExtract'
1919
$testpath = Join-Path $TestDrive $sourceName
2020
$extractpath = Join-Path $TestDrive $destName
21-
$itemCounts = Get-Structure | Build-Structure $testpath
21+
$itemCounts = Get-Structure | New-Structure $testpath
2222
$extractpath, $algos, $itemCounts | Out-Null
2323
}
2424

tests/ArchiveEntryManagementCommands.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Describe 'Archive Entry Management Commands' {
1818
$uri = 'https://www.powershellgallery.com/api/v2/package/PSCompression'
1919
$testTarName = 'TarEntryTests'
2020
$testTarpath = Join-Path $TestDrive $testTarName
21-
$itemCounts = Get-Structure | Build-Structure $testTarpath
21+
$itemCounts = Get-Structure | New-Structure $testTarpath
2222
$totalCount = $itemCounts.File + $itemCounts.Directory
2323
$algos = [PSCompression.Algorithm].GetEnumValues()
2424

tests/EncodingCompleter.tests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ Describe 'EncodingCompleter Class' {
3030
}
3131

3232
It 'Completes results from a completion set' {
33-
(Complete 'Test-Completer ').CompletionText |
33+
(Complete-Input 'Test-Completer ').CompletionText |
3434
Should -BeExactly $encodingSet
3535
}
3636

3737
It 'Completes results from a word to complete' {
38-
(Complete 'Test-Completer utf').CompletionText |
38+
(Complete-Input 'Test-Completer utf').CompletionText |
3939
Should -BeExactly ($encodingSet -match '^utf')
4040
}
4141

4242
It 'Should not offer ansi as a completion result if the OS is not Windows' {
4343
if ($osIsWindows) {
44-
(Complete 'Test-Completer ansi').CompletionText | Should -Not -BeNullOrEmpty
44+
(Complete-Input 'Test-Completer ansi').CompletionText | Should -Not -BeNullOrEmpty
4545
return
4646
}
4747

48-
(Complete 'Test-Completer ansi').CompletionText | Should -BeNullOrEmpty
48+
(Complete-Input 'Test-Completer ansi').CompletionText | Should -BeNullOrEmpty
4949
}
5050
}

tests/FormattingInternals.tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Describe 'Formatting internals' {
1515
New-ZipEntry $zip.FullName -EntryPath afolder/
1616
$testTarName = 'formattingTarTest'
1717
$testTarpath = Join-Path $TestDrive $testTarName
18-
Get-Structure | Build-Structure $testTarpath
18+
Get-Structure | New-Structure $testTarpath
1919
$tarArchive = Compress-TarArchive $testTarpath -Destination $testTarName -PassThru
2020
$tarArchive | Out-Null
2121
}

tests/shared.psm1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using namespace System.Runtime.InteropServices
33
using namespace PSCompression
44

5-
function Complete {
5+
function Complete-Input {
66
param([string] $Expression)
77

88
[CommandCompletion]::CompleteInput($Expression, $Expression.Length, $null).CompletionMatches
@@ -25,7 +25,7 @@ function Get-Structure {
2525
}
2626
}
2727

28-
function Build-Structure {
28+
function New-Structure {
2929
param(
3030
[Parameter(ValueFromPipeline, Mandatory)]
3131
[string] $Item,
@@ -70,7 +70,7 @@ $osIsWindows | Out-Null
7070

7171
$exportModuleMemberSplat = @{
7272
Variable = 'moduleName', 'manifestPath', 'osIsWindows'
73-
Function = 'Decode', 'Complete', 'Test-Completer', 'Get-Structure', 'Build-Structure'
73+
Function = 'Decode', 'Complete', 'Test-Completer', 'Get-Structure', 'New-Structure'
7474
}
7575

7676
Export-ModuleMember @exportModuleMemberSplat

tools/PesterTest.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ param (
99

1010
$ErrorActionPreference = 'Stop'
1111

12-
Get-ChildItem ([IO.Path]::Combine($PSScriptRoot, 'Modules')) -Directory |
13-
Import-Module -Name { $_.FullName } -Force -DisableNameChecking
12+
$modules = Get-ChildItem ([IO.Path]::Combine($PSScriptRoot, 'Modules')) -Directory
13+
Import-Module $modules.FullName -Force -DisableNameChecking
1414

1515
[PSCustomObject] $PSVersionTable | Select-Object *, @{
1616
Name = 'Architecture'

0 commit comments

Comments
 (0)