From 41e724afbc40cb309479dd84e0bbf6ebd01f6204 Mon Sep 17 00:00:00 2001 From: SteveGilham Date: Sat, 6 Apr 2024 16:46:35 +0100 Subject: [PATCH] Don't exclude too much --- AltCover.Tests/Tests.fs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/AltCover.Tests/Tests.fs b/AltCover.Tests/Tests.fs index f12c5577..dc008992 100644 --- a/AltCover.Tests/Tests.fs +++ b/AltCover.Tests/Tests.fs @@ -301,12 +301,16 @@ module AltCoverTests = let ShouldGetForeignPdbWithFallback () = let path = Path.Combine(SolutionDir(), "packages") + + let exclude = + Path.Combine(path, "altcover") + // Looking for the Mono.Options symbols let files = Directory.GetFiles(path, "*.pdb", SearchOption.AllDirectories) files - |> Seq.filter (_.ToLowerInvariant().Contains("altcover") >> not) + |> Seq.filter (_.StartsWith(exclude, StringComparison.OrdinalIgnoreCase) >> not) |> Seq.filter (fun p -> Path.ChangeExtension(p, ".dll") |> File.Exists) |> Seq.iter (fun p -> let dll = Path.ChangeExtension(p, ".dll") @@ -335,12 +339,16 @@ module AltCoverTests = let path = Path.Combine(SolutionDir(), "packages") + + let exclude = + Path.Combine(path, "altcover") + // Looking for the Mono.Options symbols let files = Directory.GetFiles(path, "*.pdb", SearchOption.AllDirectories) files - |> Seq.filter (_.ToLowerInvariant().Contains("altcover") >> not) + |> Seq.filter (_.StartsWith(exclude, StringComparison.OrdinalIgnoreCase) >> not) |> Seq.filter (fun p -> Path.ChangeExtension(p, ".dll") |> File.Exists) |> Seq.iter (fun p -> let dll0 = Path.ChangeExtension(p, ".dll")