Skip to content

Commit

Permalink
add fsi test util
Browse files Browse the repository at this point in the history
  • Loading branch information
kMutagene committed Sep 4, 2024
1 parent 98351f5 commit f1295e3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/TestUtils.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ open System
open System.IO
open type System.Environment
open Fake.Core
open Fake.DotNet

let runScriptWithArgs (scriptPath: string) (args: string []) =
let args = Array.concat [|[|scriptPath|]; args|]
DotNet.exec
(fun p ->
{
p with
RedirectOutput = true
PrintRedirectedOutput = true
}
)
"fsi"
(args |> String.concat " ")

let runTool (tool: string) (args: string []) (dir:string) =
CreateProcess.fromRawCommand tool args
Expand Down
2 changes: 2 additions & 0 deletions tests/ValidationPackages.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<ItemGroup>
<None Include="fixtures\**" CopyToOutputDirectory="Always" />
<Content Include="..\validation_packages\**" CopyToOutputDirectory="Always" LinkBase="validation_packages" />
<Compile Include="invenio%403.0.0.fs" />
<Compile Include="TestUtils.fs" />
<Compile Include="ReferenceObjects.fs" />
<Compile Include="TestObjects.fs" />
Expand All @@ -20,6 +21,7 @@

<ItemGroup>
<PackageReference Include="Fake.Core.Process" Version="6.0.0" />
<PackageReference Include="Fake.DotNet.Cli" Version="[6.0.0]" />
<PackageReference Include="coverlet.collector" Version="6.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.5.3" />
Expand Down
2 changes: 2 additions & 0 deletions tests/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module invenio_3

0 comments on commit f1295e3

Please sign in to comment.