From 7e01b834a53f23409f27c1714c4d31f11ac08d3f Mon Sep 17 00:00:00 2001 From: "Brett V. Forsgren" Date: Thu, 25 May 2017 17:48:51 -0700 Subject: [PATCH] completely overwrite output files to make tests more robust --- tests/fsharp/nunitConf.fs | 2 +- tests/fsharp/test-framework.fs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fsharp/nunitConf.fs b/tests/fsharp/nunitConf.fs index f0829ec08..1397b3ed7 100644 --- a/tests/fsharp/nunitConf.fs +++ b/tests/fsharp/nunitConf.fs @@ -151,7 +151,7 @@ module Command = let fullpath = Commands.getfullpath dir match rt with | Append p -> File.AppendText( p |> fullpath) - | Overwrite p -> new StreamWriter(File.OpenWrite(p |> fullpath)) + | Overwrite p -> new StreamWriter(new FileStream(p |> fullpath, FileMode.Create)) let outF fCont cmdArgs = match o with diff --git a/tests/fsharp/test-framework.fs b/tests/fsharp/test-framework.fs index df268ce3d..4f1699196 100644 --- a/tests/fsharp/test-framework.fs +++ b/tests/fsharp/test-framework.fs @@ -395,7 +395,7 @@ module Command = let fullpath = Commands.getfullpath dir match rt with | Append p -> File.AppendText( p |> fullpath) - | Overwrite p -> new StreamWriter(File.OpenWrite(p |> fullpath)) + | Overwrite p -> new StreamWriter(new FileStream(p |> fullpath, FileMode.Create)) let outF fCont cmdArgs = match redirect.Output with -- GitLab