From d244addaa602ac5ef9ef59dc80849bea0df1cd00 Mon Sep 17 00:00:00 2001 From: Ville Penttinen Date: Wed, 27 Dec 2023 11:09:57 +0100 Subject: [PATCH] Normalize lines in lineof when running tests --- src/Visp.Compiler/Syntax/SynWriter.fs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Visp.Compiler/Syntax/SynWriter.fs b/src/Visp.Compiler/Syntax/SynWriter.fs index c7dedb4..9f51c5e 100644 --- a/src/Visp.Compiler/Syntax/SynWriter.fs +++ b/src/Visp.Compiler/Syntax/SynWriter.fs @@ -137,7 +137,10 @@ module Write = let newlineIndent: SynWriter -> unit = chain newline indent let lineof (w: SynWriter) (range: range) = - fmtprintfn w "// line %i @\"%s\"" range.StartLine range.FileName + if SyntaxWriteUtilThreadStatics.RunningTests then + fmtprintfn w "// line %i @\"%s\"" range.StartLine ((NormalizedPath range.FileName).Path) + else + fmtprintfn w "// line %i @\"%s\"" range.StartLine range.FileName let text (w: SynWriter) (txt: Text) = match txt with