From ba571b224ccf82fa6e127f472097fc6cece52353 Mon Sep 17 00:00:00 2001 From: Shaun Lawrie Date: Sun, 25 Feb 2024 23:17:07 +1300 Subject: [PATCH] Fix unit tests for linux/windows harmony --- .../@snapshots/Format-SpectreBarChart.snapshot.txt | 2 +- PwshSpectreConsole.Tests/TestHelpers.psm1 | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/PwshSpectreConsole.Tests/@snapshots/Format-SpectreBarChart.snapshot.txt b/PwshSpectreConsole.Tests/@snapshots/Format-SpectreBarChart.snapshot.txt index 5788ef9c..294aee26 100644 --- a/PwshSpectreConsole.Tests/@snapshots/Format-SpectreBarChart.snapshot.txt +++ b/PwshSpectreConsole.Tests/@snapshots/Format-SpectreBarChart.snapshot.txt @@ -1,3 +1,3 @@ Test 1 █████████████████████ 10  -Test 2 █████████████████████████████████████████████ 20  +Test 2 █████████████████████████████████████████████ 20  Test 3 █████████████████████████████████████████████████████████████████████ 30 diff --git a/PwshSpectreConsole.Tests/TestHelpers.psm1 b/PwshSpectreConsole.Tests/TestHelpers.psm1 index dfb2ab6f..bfbe9c1f 100644 --- a/PwshSpectreConsole.Tests/TestHelpers.psm1 +++ b/PwshSpectreConsole.Tests/TestHelpers.psm1 @@ -249,6 +249,7 @@ function Assert-OutputMatchesSnapshot { $compare = $Output -replace "`r", "" Set-Content -Path $snapShotComparisonPath -Value $compare -NoNewline $snapshot = Get-Content -Path $snapShotPath -Raw + $snapshot = $snapshot -replace "`r", "" if($compare -ne $snapshot) { Write-Host "Expected to match snapshot:`n`n$snapshot" Write-Host "But the output was:`n`n$compare"