Fix the terse output on Windows for unelevated test run (#6252)

* Fix the terse output on Windows for unelevate test run

* Make the regex pattern more accurate
This commit is contained in:
Dongbo Wang 2018-02-26 16:57:27 -08:00 committed by Aditya Patwardhan
parent a49cc9d6e3
commit c4c47476b0

View file

@ -1097,6 +1097,10 @@ Restore the module to '$Pester' by running:
$script:nonewline = $true
$script:inerror = $false
}
elseif ($trimmedline -match "^\d+(\.\d+)?m?s$") {
# Skip the time elapse like '12ms', '1ms', '1.2s' and '12.53s'
return
}
else {
if ($script:nonewline) {
Write-Host "`n" -NoNewline