Show folder names immediately and refresh stale index sizes without walking the whole drive.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-26 11:21:20 +02:00
parent 6fc7506eb7
commit e2916aef9c
88 changed files with 5373 additions and 544 deletions

View File

@@ -0,0 +1,29 @@
using Explorer.Application;
namespace Explorer.Application.Tests;
public class MarqueeRangeTests
{
[Fact]
public void Stack_selects_rows_the_band_touches()
{
Assert.Equal([0, 1, 2], MarqueeRange.Stack(10, 70, 10, 24));
Assert.Equal([1], MarqueeRange.Stack(24, 30, 10, 24));
Assert.Equal([0], MarqueeRange.Stack(10, 10.2, 10, 24));
}
[Fact]
public void Wrap_selects_tiles_the_band_covers()
{
// 3 columns, 40x40 cells. Band over the first two tiles of row 0 and the first of row 1.
var hits = MarqueeRange.Wrap(5, 5, 55, 45, count: 8, columns: 3, itemWidth: 40, itemHeight: 40);
Assert.Equal([0, 1, 3, 4], hits);
}
[Fact]
public void Wrap_ignores_cells_past_the_item_count()
{
var hits = MarqueeRange.Wrap(0, 0, 120, 40, count: 2, columns: 3, itemWidth: 40, itemHeight: 40);
Assert.Equal([0, 1], hits);
}
}