Skip to content

Commit

Permalink
Revert "experiment : revert to readText instead of readLines"
Browse files Browse the repository at this point in the history
This reverts commit a1c79a9.
  • Loading branch information
rbleuse committed Mar 21, 2022
1 parent 39c8eff commit 3f327ac
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 hookText = gitDir.preCommitGitHook().readText()
assertThat(hookText).doesNotContain("set -e")
assertThat(hookText).contains("gradle_command_exit_code=\$?")
assertThat(hookText).contains("exit \$gradle_command_exit_code")
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")
}
}
}
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 hookText = gitDir.preCommitGitHook().readText()
assertThat(hookText).doesNotContain("set -e")
assertThat(hookText).contains("gradle_command_exit_code=\$?")
assertThat(hookText).contains("exit \$gradle_command_exit_code")
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")
}
}
}
Expand Down

0 comments on commit 3f327ac

Please sign in to comment.