Skip to content

Commit

Permalink
experiment : revert to readText instead of readLines
Browse files Browse the repository at this point in the history
  • Loading branch information
rbleuse committed Mar 13, 2022
1 parent 50fe85b commit a1c79a9
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ class GitHookTasksTest : AbstractPluginTest() {
build(":$INSTALL_GIT_HOOK_CHECK_TASK") {
assertThat(task(":$INSTALL_GIT_HOOK_CHECK_TASK")?.outcome).isEqualTo(TaskOutcome.SUCCESS)

val hookTextLines = gitDir.preCommitGitHook().readLines()
assertThat(hookTextLines).doesNotContain("set -e")
assertThat(hookTextLines).contains("gradle_command_exit_code=\$?")
assertThat(hookTextLines).contains("exit \$gradle_command_exit_code")
val hookText = gitDir.preCommitGitHook().readText()
assertThat(hookText).doesNotContain("set -e")
assertThat(hookText).contains("gradle_command_exit_code=\$?")
assertThat(hookText).contains("exit \$gradle_command_exit_code")
}
}
}
Expand All @@ -200,10 +200,10 @@ class GitHookTasksTest : AbstractPluginTest() {
build(":$INSTALL_GIT_HOOK_FORMAT_TASK") {
assertThat(task(":$INSTALL_GIT_HOOK_FORMAT_TASK")?.outcome).isEqualTo(TaskOutcome.SUCCESS)

val hookTextLines = gitDir.preCommitGitHook().readLines()
assertThat(hookTextLines).doesNotContain("set -e")
assertThat(hookTextLines).contains("gradle_command_exit_code=\$?")
assertThat(hookTextLines).contains("exit \$gradle_command_exit_code")
val hookText = gitDir.preCommitGitHook().readText()
assertThat(hookText).doesNotContain("set -e")
assertThat(hookText).contains("gradle_command_exit_code=\$?")
assertThat(hookText).contains("exit \$gradle_command_exit_code")
}
}
}
Expand Down

0 comments on commit a1c79a9

Please sign in to comment.