mirror of
https://github.com/Smaug123/WoofWare.Expect
synced 2025-10-06 04:58:39 +00:00
WIP
This commit is contained in:
@@ -2,6 +2,7 @@ namespace WoofWare.Expect
|
||||
|
||||
open System
|
||||
open System.Text.RegularExpressions
|
||||
open Fantomas.FCS.Text
|
||||
|
||||
type private StringLiteralInfo =
|
||||
{
|
||||
@@ -207,6 +208,7 @@ module internal SnapshotUpdate =
|
||||
/// instead returns the new contents.
|
||||
/// We always write single-quoted @-strings for simplicity.
|
||||
let private updateSnapshot (lines : string[]) (info : StringLiteralInfo) (newContent : string) : string[] =
|
||||
let f, _ = Fantomas.FCS.Parse.parseFile false (SourceText.ofString (String.concat "\n" lines)) []
|
||||
let newString = "@\"" + newContent.Replace ("\"", "\"\"") + "\""
|
||||
|
||||
if info.StartLine = info.EndLine then
|
||||
|
@@ -36,8 +36,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- FSharp.SystemTextJson requires at least this version -->
|
||||
<PackageReference Update="FSharp.Core" Version="4.7.0" />
|
||||
<!-- Fantomas.FCS requires at least this version -->
|
||||
<PackageReference Update="FSharp.Core" Version="8.0.100" />
|
||||
<PackageReference Include="Fantomas.FCS" Version="7.0.3" />
|
||||
<PackageReference Include="FSharp.SystemTextJson" Version="1.4.36" />
|
||||
<!-- Needed for DeepEquals -->
|
||||
<PackageReference Include="System.Text.Json" Version="9.0.0" />
|
||||
|
Reference in New Issue
Block a user