From d40a13fd49f228000ec47f7819ed72af209aeda3 Mon Sep 17 00:00:00 2001 From: Oliver Newman Date: Thu, 31 Aug 2023 21:45:20 +0000 Subject: [PATCH] [engine] Fix test on windows Change-Id: I73e405fdec668f17919a57b2ef039c062fddc2ff Reviewed-on: https://fuchsia-review.googlesource.com/c/shac-project/shac/+/910594 Commit-Queue: Marc-Antoine Ruel Reviewed-by: Marc-Antoine Ruel Fuchsia-Auto-Submit: Oliver Newman --- internal/engine/run_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/internal/engine/run_test.go b/internal/engine/run_test.go index 2a15c8e..ed93f01 100644 --- a/internal/engine/run_test.go +++ b/internal/engine/run_test.go @@ -1661,7 +1661,13 @@ func TestTestDataPrint(t *testing.T) { }, { "ctx-os-exec-relpath.star", - "[//ctx-os-exec-relpath.star:17] Hello from a nested file\n\n", + func() string { + // TODO(maruel): Decide if we want to do CRLF translation automatically. + if runtime.GOOS == "windows" { + return "[//ctx-os-exec-relpath.star:17] Hello from a nested file\r\n\n" + } + return "[//ctx-os-exec-relpath.star:17] Hello from a nested file\n\n" + }(), }, { "ctx-os-exec-stdin.star",