From abaa636f3a0dda44691233dfbb0c807866fcf8a1 Mon Sep 17 00:00:00 2001 From: Bryce Milton Date: Thu, 21 Apr 2016 12:28:36 -0700 Subject: [PATCH] Fixing non-windows byte-encoding verification failure --- test/powershell/Get-Content.Tests.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/powershell/Get-Content.Tests.ps1 b/test/powershell/Get-Content.Tests.ps1 index 985b505d0..dc19cbbd1 100644 --- a/test/powershell/Get-Content.Tests.ps1 +++ b/test/powershell/Get-Content.Tests.ps1 @@ -132,8 +132,10 @@ Describe "Get-Content" { $result=get-content -path $testPath -encoding:Byte -tail 10 $result.Length | Should Be 10 - $expected = "52","44","87","111","114","108","100","52","13","10" - for ($i = 0; $i -lt $result.Length ; $i++) { $result[$i] | Should BeExactly $expected[$i]} + if ($IsWindows) { + $expected = "52","44","87","111","114","108","100","52","13","10" + for ($i = 0; $i -lt $result.Length ; $i++) { $result[$i] | Should BeExactly $expected[$i]} + } } It "should get-content that matches the input string"{ #[DRT][BugId(BugDatabase.WindowsOutOfBandReleases, 905829)]