Skip to content

Commit c50bdc2

Browse files
committed
test: fix GetRemoteEntryPointPath discovery unit test to clean previous .cs files before 'only.cs' case
1 parent 2cc97bd commit c50bdc2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/Tests/GoBuildCacheTests.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ public void GetRemoteEntryPointPath_uses_path_or_program_or_persisted_marker()
165165
Assert.True(File.Exists(m2));
166166
Assert.Equal("program.cs", File.ReadAllText(m2).Trim());
167167

168-
// case with no program.cs: should pick the (only) other
168+
// case with no program.cs: should pick the (only) remaining .cs
169169
File.Delete(prog);
170+
var other = Path.Combine(discDir, "other.cs");
171+
if (File.Exists(other)) File.Delete(other);
170172
if (File.Exists(m2)) File.Delete(m2);
171173
File.WriteAllText(Path.Combine(discDir, "only.cs"), "// only");
172174
var onlyDisc = Devlooped.RemoteSourceResolver.GetRemoteEntryPointPath(remoteDisc);

0 commit comments

Comments
 (0)