Merge claudedo/58764ab72f3e41e0871b9c81149ba1cc
This commit is contained in:
@@ -117,6 +117,29 @@ public sealed class RepoScannerTests : IDisposable
|
||||
Assert.Empty(result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Scan_ReturnsEmptyWhenRootIsAReparsePoint()
|
||||
{
|
||||
var repo = MakeDir("real-repo");
|
||||
Directory.CreateDirectory(Path.Combine(repo, ".git"));
|
||||
|
||||
var junction = Path.Combine(_root, "junction-to-real-repo");
|
||||
var mklink = System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
|
||||
{
|
||||
FileName = "cmd.exe",
|
||||
Arguments = $"/c mklink /J \"{junction}\" \"{repo}\"",
|
||||
UseShellExecute = false,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
})!;
|
||||
mklink.WaitForExit();
|
||||
Assert.True(Directory.Exists(junction), "Failed to create test junction: " + mklink.StandardError.ReadToEnd());
|
||||
|
||||
var result = RepoScanner.Scan(junction);
|
||||
|
||||
Assert.Empty(result);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
#pragma warning disable CA1416 // ACL manipulation is Windows-only; this test targets the Windows dev/CI environment
|
||||
public void Scan_ContinuesAfterUnreadableSubdirectory()
|
||||
|
||||
Reference in New Issue
Block a user