From 33e3a564b815aa265f6eacb244b73a4d4c58beb0 Mon Sep 17 00:00:00 2001 From: nick Date: Sat, 21 Nov 2026 10:27:21 +0000 Subject: [PATCH] Normalize source line endings in regression assertions --- PlotLine.Tests/Program.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/PlotLine.Tests/Program.cs b/PlotLine.Tests/Program.cs index 8e5660dd..fb841bd1 100644 --- a/PlotLine.Tests/Program.cs +++ b/PlotLine.Tests/Program.cs @@ -1031,7 +1031,7 @@ static void StoryIntelligenceReviewCentreRouteReplacesLinearReviewResume() { var root = PlotLineRoot(); var controller = File.ReadAllText(Path.Combine(root, "Controllers/OnboardingController.cs")); - var service = File.ReadAllText(Path.Combine(root, "Services/OnboardingStoryIntelligenceService.cs")); + var service = File.ReadAllText(Path.Combine(root, "Services/OnboardingStoryIntelligenceService.cs")).ReplaceLineEndings("\n"); var view = File.ReadAllText(Path.Combine(root, "Views/Onboarding/StoryIntelligenceReviewCentre.cshtml")); Assert(controller.Contains("story-intelligence/review-centre", StringComparison.Ordinal), "Review Centre route should exist."); @@ -1078,7 +1078,7 @@ static void StoryIntelligenceReviewCentreUsesIndependentTileGrid() { var root = PlotLineRoot(); var centre = File.ReadAllText(Path.Combine(root, "Views/Onboarding/StoryIntelligenceReviewCentre.cshtml")); - var css = File.ReadAllText(Path.Combine(root, "wwwroot/css/onboarding.css")); + var css = File.ReadAllText(Path.Combine(root, "wwwroot/css/onboarding.css")).ReplaceLineEndings("\n"); var tileOrder = new[] { "\"Characters\"", @@ -1680,7 +1680,7 @@ static void StoryIntelligenceDetailedReviewGetsUseSelectedModulePaths() static void StoryIntelligenceCompletedCharacterReviewRemainsInspectable() { var root = PlotLineRoot(); - var controller = File.ReadAllText(Path.Combine(root, "Controllers/OnboardingController.cs")); + var controller = File.ReadAllText(Path.Combine(root, "Controllers/OnboardingController.cs")).ReplaceLineEndings("\n"); var onboarding = File.ReadAllText(Path.Combine(root, "Services/OnboardingStoryIntelligenceService.cs")); var candidateService = File.ReadAllText(Path.Combine(root, "Services/StoryIntelligenceReviewCandidateService.cs")); var view = File.ReadAllText(Path.Combine(root, "Views/Onboarding/StoryIntelligenceCharacters.cshtml")); @@ -2302,7 +2302,7 @@ static void WordCompanionCanonicalMarkersDriveRuntimeFollow() static void WordCompanionRuntimeFollowsMultipleImportedSceneAnchors() { var root = Path.Combine(AppContext.BaseDirectory, "../../../../PlotLine"); - var script = File.ReadAllText(Path.Combine(root, "wwwroot/js/word-companion-host.js")); + var script = File.ReadAllText(Path.Combine(root, "wwwroot/js/word-companion-host.js")).ReplaceLineEndings("\n"); Assert(script.Contains("await loadParagraphAnchors(context, bodyParagraphs, null, \"runtime structure\")", StringComparison.Ordinal), "Runtime structure reads must load paragraph anchors, not only text/style."); Assert(script.Contains("chapterAnchorId: paragraphAnchorId(paragraph, \"PD-CHAPTER\")", StringComparison.Ordinal), "Runtime paragraph snapshots should carry canonical chapter anchors."); @@ -2432,7 +2432,7 @@ static void WritingPagesDoNotRequireStoryIntelligence() static void WordCompanionHostScriptHasValidTabMapping() { var root = Path.Combine(AppContext.BaseDirectory, "../../../../PlotLine"); - var script = File.ReadAllText(Path.Combine(root, "wwwroot/js/word-companion-host.js")); + var script = File.ReadAllText(Path.Combine(root, "wwwroot/js/word-companion-host.js")).ReplaceLineEndings("\n"); var view = File.ReadAllText(Path.Combine(root, "Views/WordCompanionHost/Index.cshtml")); Assert(script.Contains("const normalizeTabName = (tabName) =>", StringComparison.Ordinal), "Tab-name compatibility helper is missing."); @@ -3237,7 +3237,7 @@ static void LocationCandidateIdentityIsParentAwareForGenericSubLocations() static void LocationsPageUsesHierarchicalSortOrder() { var root = Path.Combine(AppContext.BaseDirectory, "../../../../PlotLine"); - var service = File.ReadAllText(Path.Combine(root, "Services/CoreServices.cs")); + var service = File.ReadAllText(Path.Combine(root, "Services/CoreServices.cs")).ReplaceLineEndings("\n"); var index = File.ReadAllText(Path.Combine(root, "Views/Locations/Index.cshtml")); Assert(index.Contains("