Trying to compare two multi-line strings in Powershell Pester.

This seems to work, but I’m not sure it’s the best way?

$ExpLines = $Exp.split("n") $RetLines = $Ret.split("n")

$LNo = 0

foreach ($E in $ExpLines) {

$RetLines[$LNo] | should be $E

$LNo = $LNo + 1

}