Skip to content

Commit

Permalink
[PCompiler] Fix incorrect string matching when excluding imported tes…
Browse files Browse the repository at this point in the history
…t cases (#751)
  • Loading branch information
aman-goel authored Jul 18, 2024
1 parent 5da26ab commit e09ba81
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Src/PCompiler/CompilerCore/TypeChecker/Scope.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using Antlr4.Runtime;
using Plang.Compiler.TypeChecker.AST;
Expand Down Expand Up @@ -603,7 +605,7 @@ public SafetyTest Put(string name, PParser.SafetyTestDeclContext tree)
string filePath = config.LocationResolver.GetLocation(tree).File.FullName;
foreach (var dependencyPath in config.ProjectDependencies)
{
if (filePath.StartsWith(dependencyPath))
if (filePath.StartsWith($"{dependencyPath}{Path.DirectorySeparatorChar}"))
{
return null;
}
Expand Down

0 comments on commit e09ba81

Please sign in to comment.