Skip to content

Commit

Permalink
module - update test to run on PS7+
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmelton committed Jan 6, 2021
1 parent ce0aeba commit a66f2f4
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/Module.FileIntegrity.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,18 @@ Describe "Verifying module PS1 files" -Foreach $allFiles {
[string]$Path
)

[byte[]]$byte = Get-Content -Encoding byte -ReadCount 4 -TotalCount 4 -Path $Path
$params = @{
ReadCount = 4
TotalCount = 4
Path = $Path
}
if ($PSVersionTable.PSEdition -ne 'Desktop') {
$params.Add('AsByteStream',$true)
} else {
$params.Add('Encoding','Byte')
}

[byte[]]$byte = Get-Content @params
#Write-Host Bytes: $byte[0] $byte[1] $byte[2] $byte[3]

# EF BB BF (UTF8)
Expand Down

0 comments on commit a66f2f4

Please sign in to comment.