C# NameSetTests: THING_PARITY_WRITE writes catalog-members.tsv

This commit is contained in:
Meta Vens 2026-11-28 01:23:43 +01:00
commit fd753e5786
3 changed files with 5 additions and 1 deletions

View file

@ -23,6 +23,10 @@ public sealed class NameSetTests
var entry = Wire.Registry.GetRequired(t).ToCatalogEntry();
return entry.Members.Select(m => $"{entry.SchemaId}\t{m.Slot}\t{m.MemberName}\t{m.TypeName}");
}).ToArray();
if (Environment.GetEnvironmentVariable("THING_PARITY_WRITE") == "1")
File.WriteAllText(ParityTests.SourceParityPath("catalog-members.tsv"), string.Join("
", actual) + "
");
Assert.That(actual, Is.EqualTo(Lines("catalog-members.tsv")));
Assert.That(actual, Has.Length.GreaterThan(20));
}

View file

@ -15,7 +15,7 @@ public sealed class ParityTests
{
private static string ParityPath(string file) => Path.Combine(AppContext.BaseDirectory, "parity", file);
private static string SourceParityPath(string file)
internal static string SourceParityPath(string file)
{
for (var here = new DirectoryInfo(AppContext.BaseDirectory); here != null; here = here.Parent)
{