Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

42
e2e/csharp/TestSetup.cs generated Normal file
View File

@@ -0,0 +1,42 @@
// This file is auto-generated by alef — DO NOT EDIT.
// alef:hash:4e15143f4af1ae8bafbdb1506ef057da924484c66a19483966333558ad437e75
// To regenerate: alef generate
// To verify freshness: alef verify --exit-code
// Issues & docs: https://github.com/kreuzberg-dev/alef
using System;
using System.IO;
using System.Runtime.CompilerServices;
namespace Kreuzberg;
internal static class TestSetup
{
[ModuleInitializer]
internal static void Init()
{
// Walk up from the assembly directory until we find the repo root.
// Prefer a sibling test_documents/ directory (chdir into it so that
// fixture paths like "docx/fake.docx" resolve relative to it). If that
// is absent (web-crawler-style repos with no document fixtures), fall
// back to a sibling alef.toml or fixtures/ marker as the repo root.
var dir = new DirectoryInfo(AppContext.BaseDirectory);
DirectoryInfo? repoRoot = null;
while (dir != null)
{
var documentsCandidate = Path.Combine(dir.FullName, "test_documents");
if (Directory.Exists(documentsCandidate))
{
repoRoot = dir;
Directory.SetCurrentDirectory(documentsCandidate);
break;
}
if (File.Exists(Path.Combine(dir.FullName, "alef.toml"))
|| Directory.Exists(Path.Combine(dir.FullName, "fixtures")))
{
repoRoot = dir;
break;
}
dir = dir.Parent;
}
}
}