Skip to content

Commit

Permalink
#292 Fix naming test failures based on naming differences between the…
Browse files Browse the repository at this point in the history
… different OS-systems

- / and \
- Windows path abbreviations like RUNNER~1 for runneradmin
  • Loading branch information
simonhauck committed Jan 19, 2025
1 parent c66fdfa commit 7f929ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ internal class KtfmtBaseTaskTest {

val underTest = project.tasks.getByName("ktfmtFormatMain") as KtfmtBaseTask

val expectedFile = tempDir.resolve("build/ktfmt/ktfmtFormatMain/output.txt")
assertThat(underTest.outputs.files).containsExactly(expectedFile)
val expectedFile = tempDir.resolve("build/ktfmt/ktfmtFormatMain/output.txt").canonicalFile
assertThat(underTest.outputs.files.map { it.canonicalFile }).containsExactly(expectedFile)
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ internal class KtfmtFormatTaskIntegrationTest {
.buildAndFail()

assertThat(result.task(":ktfmtFormatMain")?.outcome).isEqualTo(FAILED)
assertThat(result.output).containsMatch("Failed to format file: .*/TestFile.kt \\(reason =")
assertThat(result.output).containsMatch("Failed to format file: .*TestFile.kt \\(reason =")
}

@Test
Expand Down

0 comments on commit 7f929ad

Please sign in to comment.