mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-29 20:34:04 +02:00
Minor formatting tweaks
This commit is contained in:
parent
f87c649b09
commit
a117559063
@ -9,14 +9,13 @@ $ErrorActionPreference = "Stop"
|
|||||||
|
|
||||||
try{
|
try{
|
||||||
$sw = [Diagnostics.Stopwatch]::StartNew()
|
$sw = [Diagnostics.Stopwatch]::StartNew()
|
||||||
Write-Host "--------------------------"
|
|
||||||
|
|
||||||
if ($version.Equals("")){
|
if ($version.Equals("")){
|
||||||
$version = (Get-Item (Join-Path $targetDir "TweetDuck.exe")).VersionInfo.FileVersion
|
$version = (Get-Item (Join-Path $targetDir "TweetDuck.exe")).VersionInfo.FileVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Write-Host "--------------------------"
|
||||||
Write-Host "TweetDuck version" $version
|
Write-Host "TweetDuck version" $version
|
||||||
|
|
||||||
Write-Host "--------------------------"
|
Write-Host "--------------------------"
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
@ -62,7 +61,7 @@ try{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((Get-Content -Path $file -Raw).Contains("`r")){
|
if ((Get-Content -Path $file -Raw).Contains("`r")){
|
||||||
Throw "$file cannot contain carriage return"
|
Throw "$file must not have any carriage return characters"
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "Verified" $file.Substring($targetDir.Length)
|
Write-Host "Verified" $file.Substring($targetDir.Length)
|
||||||
@ -116,10 +115,13 @@ try{
|
|||||||
Rewrite-File $file $lines
|
Rewrite-File $file $lines
|
||||||
}
|
}
|
||||||
|
|
||||||
Write-Host "------------------"
|
# Finished
|
||||||
|
|
||||||
$sw.Stop()
|
$sw.Stop()
|
||||||
|
Write-Host "------------------"
|
||||||
Write-Host "Finished in" $([math]::Round($sw.Elapsed.TotalMilliseconds)) "ms"
|
Write-Host "Finished in" $([math]::Round($sw.Elapsed.TotalMilliseconds)) "ms"
|
||||||
Write-Host "------------------"
|
Write-Host "------------------"
|
||||||
|
|
||||||
}catch{
|
}catch{
|
||||||
Write-Host "Encountered an error while running PostBuild.ps1 on line" $_.InvocationInfo.ScriptLineNumber
|
Write-Host "Encountered an error while running PostBuild.ps1 on line" $_.InvocationInfo.ScriptLineNumber
|
||||||
Write-Host $_
|
Write-Host $_
|
||||||
|
@ -13,11 +13,11 @@ module TestResult_WithValue =
|
|||||||
Assert.True(result.HasValue)
|
Assert.True(result.HasValue)
|
||||||
|
|
||||||
[<Fact>]
|
[<Fact>]
|
||||||
let ``Accessing Value returns the provided value`` () =
|
let ``accessing Value returns the provided value`` () =
|
||||||
Assert.Equal(10, result.Value)
|
Assert.Equal(10, result.Value)
|
||||||
|
|
||||||
[<Fact>]
|
[<Fact>]
|
||||||
let ``Accessing Exception throws`` () =
|
let ``accessing Exception throws`` () =
|
||||||
Assert.Throws<InvalidOperationException>(fun () -> result.Exception |> ignore)
|
Assert.Throws<InvalidOperationException>(fun () -> result.Exception |> ignore)
|
||||||
|
|
||||||
[<Fact>]
|
[<Fact>]
|
||||||
@ -39,11 +39,11 @@ module TestResult_WithException =
|
|||||||
Assert.False(result.HasValue)
|
Assert.False(result.HasValue)
|
||||||
|
|
||||||
[<Fact>]
|
[<Fact>]
|
||||||
let ``Accessing Value throws`` () =
|
let ``accessing Value throws`` () =
|
||||||
Assert.Throws<InvalidOperationException>(fun () -> result.Value |> ignore)
|
Assert.Throws<InvalidOperationException>(fun () -> result.Value |> ignore)
|
||||||
|
|
||||||
[<Fact>]
|
[<Fact>]
|
||||||
let ``Accessing Exception returns the provided exception`` () =
|
let ``accessing Exception returns the provided exception`` () =
|
||||||
Assert.IsType<IndexOutOfRangeException>(result.Exception)
|
Assert.IsType<IndexOutOfRangeException>(result.Exception)
|
||||||
|
|
||||||
[<Fact>]
|
[<Fact>]
|
||||||
|
Loading…
Reference in New Issue
Block a user