mirror of
https://github.com/Smaug123/WoofWare.Expect
synced 2025-10-06 13:08:39 +00:00
Compare commits
1 Commits
e0153ab182
...
fcs
Author | SHA1 | Date | |
---|---|---|---|
|
7d452ea533 |
@@ -2,6 +2,7 @@ namespace WoofWare.Expect
|
|||||||
|
|
||||||
open System
|
open System
|
||||||
open System.Text.RegularExpressions
|
open System.Text.RegularExpressions
|
||||||
|
open Fantomas.FCS.Text
|
||||||
|
|
||||||
type private StringLiteralInfo =
|
type private StringLiteralInfo =
|
||||||
{
|
{
|
||||||
@@ -207,6 +208,7 @@ module internal SnapshotUpdate =
|
|||||||
/// instead returns the new contents.
|
/// instead returns the new contents.
|
||||||
/// We always write single-quoted @-strings for simplicity.
|
/// We always write single-quoted @-strings for simplicity.
|
||||||
let private updateSnapshot (lines : string[]) (info : StringLiteralInfo) (newContent : string) : string[] =
|
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 ("\"", "\"\"") + "\""
|
let newString = "@\"" + newContent.Replace ("\"", "\"\"") + "\""
|
||||||
|
|
||||||
if info.StartLine = info.EndLine then
|
if info.StartLine = info.EndLine then
|
||||||
|
@@ -36,8 +36,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- FSharp.SystemTextJson requires at least this version -->
|
<!-- Fantomas.FCS requires at least this version -->
|
||||||
<PackageReference Update="FSharp.Core" Version="4.7.0" />
|
<PackageReference Update="FSharp.Core" Version="8.0.100" />
|
||||||
|
<PackageReference Include="Fantomas.FCS" Version="7.0.3" />
|
||||||
<PackageReference Include="FSharp.SystemTextJson" Version="1.4.36" />
|
<PackageReference Include="FSharp.SystemTextJson" Version="1.4.36" />
|
||||||
<!-- Needed for DeepEquals -->
|
<!-- Needed for DeepEquals -->
|
||||||
<PackageReference Include="System.Text.Json" Version="9.0.0" />
|
<PackageReference Include="System.Text.Json" Version="9.0.0" />
|
||||||
|
Reference in New Issue
Block a user