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:
2026-08-24 15:04:04 +02:00
parent 9bf451932f
commit a3c54bbb03
127 changed files with 14748 additions and 633 deletions

View File

@@ -0,0 +1,69 @@
using Explorer.Application;
namespace Explorer.Application.Tests;
public class MarkdownParserTests
{
[Fact]
public void Parses_headings_lists_and_tables()
{
var doc = MarkdownParser.Parse("""
# Title
Intro paragraph.
## Locations
- One
- Two
| A | B |
| --- | --- |
| 1 | 2 |
""");
Assert.Contains(doc.Blocks, b => b is MarkdownHeading h && h.Level == 1 && h.Text == "Title");
Assert.Equal("Locations", Assert.Single(doc.Headings).Text);
var list = Assert.IsType<MarkdownList>(doc.Blocks.First(b => b is MarkdownList));
Assert.Equal(["One", "Two"], list.Items);
var table = Assert.IsType<MarkdownTable>(doc.Blocks.First(b => b is MarkdownTable));
Assert.Equal(["A", "B"], table.Headers);
Assert.Equal(["1", "2"], Assert.Single(table.Rows));
}
[Fact]
public void Parses_fenced_code()
{
var doc = MarkdownParser.Parse("""
```powershell
dotnet build
```
""");
var code = Assert.IsType<MarkdownCode>(Assert.Single(doc.Blocks));
Assert.Equal("powershell", code.Language);
Assert.Equal("dotnet build", code.Text);
}
[Fact]
public void User_guide_in_the_repo_parses()
{
var dir = new DirectoryInfo(AppContext.BaseDirectory);
string? path = null;
while (dir is not null)
{
var candidate = Path.Combine(dir.FullName, "docs", "Documentation.md");
if (File.Exists(candidate))
{
path = candidate;
break;
}
dir = dir.Parent;
}
Assert.NotNull(path);
var doc = MarkdownParser.Parse(File.ReadAllText(path));
Assert.Contains(doc.Headings, h => h.Text == "Locations");
Assert.Contains(doc.Headings, h => h.Text == "File Operations Queue");
Assert.Contains(doc.Blocks, b => b is MarkdownTable);
}
}