From 4e9788e3719575dbbcc2a7eb78d51b640f92f8bb Mon Sep 17 00:00:00 2001 From: dwalend Date: Sat, 12 Oct 2024 23:50:45 -0400 Subject: [PATCH] Fixed the scripted test --- .../update-lsp-config/build.sbt | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/modules/codegen-plugin/src/sbt-test/codegen-plugin/update-lsp-config/build.sbt b/modules/codegen-plugin/src/sbt-test/codegen-plugin/update-lsp-config/build.sbt index 98b2f6270..65ae454dc 100644 --- a/modules/codegen-plugin/src/sbt-test/codegen-plugin/update-lsp-config/build.sbt +++ b/modules/codegen-plugin/src/sbt-test/codegen-plugin/update-lsp-config/build.sbt @@ -2,23 +2,43 @@ import sbt.io.IO val subproj = project val subproj2 = project.enablePlugins(Smithy4sCodegenPlugin) - +// "com.disneystreaming.smithy4s:smithy4s-protocol:${smithy4sVersion.value}" val root = project .in(file(".")) .aggregate(subproj, subproj2) .settings( TaskKey[Unit]("checkSmithyBuild") := { val generated = IO.readLines(file(".") / "smithy-build.json") - val expected = IO.readLines(file(".") / "expected.json") + val expected = s"""{ + | "version" : "1.0", + | "sources" : [ + | "subproj2/src/main/smithy", + | "subproj2/target/scala-2.12/src_managed/main/smithy" + | ], + | "maven" : { + | "dependencies" : [ + | "com.disneystreaming.alloy:alloy-core:0.3.13", + | "com.disneystreaming.smithy4s:smithy4s-protocol:${smithy4sVersion.value}" + | ], + | "repositories" : [ + | { + | "url" : "https://oss.sonatype.org/content/repositories/snapshots" + | }, + | { + | "url" : "https://s01.oss.sonatype.org/content/repositories/snapshots" + | } + | ] + | } + |}""".stripMargin val compare = s"""|generated: |${generated.mkString("\n")} |=================================== |expected: - |${expected.mkString("\n")} + |${expected} |=================================== |""".stripMargin - assert(generated == expected, s"content are not the same:\n $compare") + assert(generated.mkString("\n") == expected, s"content are not the same:\n $compare") () } )