Skip to content

Commit

Permalink
Merge pull request #23 from theohbrothers/fix/tests-fix-non-existing-…
Browse files Browse the repository at this point in the history
…out-file-path-parameter-in-powershell-5

Fix (tests): Fix non-existing Out-File -Path parameter in Powershell <= 5
  • Loading branch information
leojonathanoh authored May 30, 2021
2 parents bb68718 + e12874b commit 440a796
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Get-DuplicateItem/public/Get-DuplicateItem.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ Describe "Get-DuplicateItem" -Tag 'Unit' {

$parentDir = "TestDrive:\parent"
New-Item $parentDir -ItemType Directory -Force > $null
'foo' | Out-File -Path "$parentDir\file1" -Encoding utf8 -Force
'foo' | Out-File -Path "$parentDir\file2" -Encoding utf8 -Force
'foooooooo' | Out-File -Path "$parentDir\file3" -Encoding utf8 -Force
'foo' | Out-File "$parentDir\file1" -Encoding utf8 -Force
'foo' | Out-File "$parentDir\file2" -Encoding utf8 -Force
'foooooooo' | Out-File "$parentDir\file3" -Encoding utf8 -Force

$childDir = "$parentDir\child"
New-Item $childDir -ItemType Directory -Force > $null
'foo' | Out-File -Path "$childDir\file1" -Encoding utf8 -Force
'foo' | Out-File -Path "$childDir\file2" -Encoding utf8 -Force
'foooooooo123' | Out-File -Path "$childDir\file4" -Encoding utf8 -Force
'foo' | Out-File "$childDir\file1" -Encoding utf8 -Force
'foo' | Out-File "$childDir\file2" -Encoding utf8 -Force
'foooooooo123' | Out-File "$childDir\file4" -Encoding utf8 -Force

It 'Returns duplicate file paths' {
$result = Get-DuplicateItem -Path $parentDir
Expand Down

0 comments on commit 440a796

Please sign in to comment.