diff --git a/jte-models/src/test/java/gg/jte/models/generator/TestModelExtension.java b/jte-models/src/test/java/gg/jte/models/generator/TestModelExtension.java index cc00b400..09668992 100644 --- a/jte-models/src/test/java/gg/jte/models/generator/TestModelExtension.java +++ b/jte-models/src/test/java/gg/jte/models/generator/TestModelExtension.java @@ -231,7 +231,7 @@ public void generatesKotlinWithoutDefaultValueForContentParams() { } )); var expected = Map.of( - "Templates.kt", """ + "Templates.kt", withSystemLineEndings(""" @file:Suppress("ktlint") package test.myktemplates @@ -242,8 +242,8 @@ interface Templates { @JteView("hello.kte") fun hello(content: gg.jte.Content): JteModel - }""", - "StaticTemplates.kt", """ + }"""), + "StaticTemplates.kt", withSystemLineEndings(""" @file:Suppress("ktlint") package test.myktemplates @@ -262,8 +262,8 @@ override fun hello(content: gg.jte.Content): JteModel = StaticJteModel( JtehelloGenerated.JTE_LINE_INFO ) - }""", - "DynamicTemplates.kt", """ + }"""), + "DynamicTemplates.kt", withSystemLineEndings(""" @file:Suppress("ktlint") package test.myktemplates @@ -362,9 +362,13 @@ override fun hello(): JteModel { return DynamicJteModel(engine, "hello.kte", paramMap) } - }""" + }""") ); assertThat(actual).containsExactlyInAnyOrderEntriesOf(expected); } } + + private static String withSystemLineEndings(String content) { + return content.replaceAll("\n", System.lineSeparator()); + } }