Skip to content

Commit

Permalink
🐛 Fix tests on windows (#18)
Browse files Browse the repository at this point in the history
* Update Gradle to 6.6.1

* Fix line endings in test assertions for Windows

On Windows, tests create files with CR/LF line endings, whereas the assertions are based on LF.
  • Loading branch information
pinx committed Oct 8, 2020
1 parent 918e50c commit 65485a0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Fri May 01 20:33:27 CEST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ class GrvFileHasContentAssertion implements Assertion {
@Override
void check() throws Exception {
assertThat(
file.text
file.text.replace("\r\n", "\n")
).isEqualTo(
expectedContent
expectedContent.replace("\r\n", "\n")
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DiagramHasContentAssertion(
*/
override fun check() {
assertThat(
diagram.content()
).isEqualTo(expectedContent)
diagram.content().replace("\r\n", "\n")
).isEqualTo(expectedContent.replace("\r\n", "\n"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class KtFileHasContentAssertion(
*/
override fun check() {
assertThat(
file.readText()
file.readText().replace("\r\n", "\n")
).isEqualTo(
expectedContent
expectedContent.replace("\r\n", "\n")
)
}
}

0 comments on commit 65485a0

Please sign in to comment.