Add Git overlay, operation tools, and virtualized preview so large folders stay responsive.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
30
tests/Explorer.Application.Tests/SevenZipLocatorTests.cs
Normal file
30
tests/Explorer.Application.Tests/SevenZipLocatorTests.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Explorer.Application;
|
||||
|
||||
namespace Explorer.Application.Tests;
|
||||
|
||||
public class SevenZipLocatorTests
|
||||
{
|
||||
[Fact]
|
||||
public void Prefers_the_configured_path_when_it_exists()
|
||||
{
|
||||
var path = @"C:\Tools\7z.exe";
|
||||
Assert.Equal(path, SevenZipLocator.Find(path, fileExists: p => p == path, pathVariable: ""));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Finds_7z_on_PATH_when_not_configured()
|
||||
{
|
||||
var found = SevenZipLocator.Find(
|
||||
null,
|
||||
fileExists: p => p.Equals(@"D:\bin\7z.exe", StringComparison.OrdinalIgnoreCase),
|
||||
pathVariable: @"C:\Windows;D:\bin");
|
||||
Assert.Equal(@"D:\bin\7z.exe", found);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Returns_null_when_7zip_is_missing()
|
||||
{
|
||||
Assert.Null(SevenZipLocator.Find(null, fileExists: _ => false, pathVariable: @"C:\none"));
|
||||
Assert.Contains("7-Zip", SevenZipLocator.MissingHint, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user