CreditsTests: compare the licence directory with forward slashes on both sides

Path.GetDirectoryName returns backslashes on Windows, so the licence text never "sat beside" its fonts there.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
soul 2026-11-26 03:22:59 +01:00
commit c834e5fa73

View file

@ -285,7 +285,7 @@ namespace Aetheria.Shared.Tests
var notice = credits.Single(credit => credit.LicenceFile == creditFile).Notice;
var licenceText = Read(creditFile);
Assert.Contains(creditFile.Contains("UFL") ? "UBUNTU FONT LICENCE Version 1.0" : "SIL OPEN FONT LICENSE Version 1.1", licenceText);
Assert.True(Path.GetDirectoryName(creditFile) == Path.GetDirectoryName(fonts[0]).Replace('\\', '/'), "licence text sits beside its fonts");
Assert.True(Path.GetDirectoryName(creditFile).Replace('\\', '/') == Path.GetDirectoryName(fonts[0]).Replace('\\', '/'), "licence text sits beside its fonts");
if (creditFile.Contains("OFL")) Assert.Contains(embedded, licenceText);
Assert.Contains(embedded, notice);
foreach (var font in fonts)