Sitelet https://github.com/yepcode/git-auto-commit-action/commit/fe00d258677e45d1f05473557e57bdfe865370fc
Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Commit fe00d25

Browse files
committed
Add test for multi-line commit messages
1 parent 86fb2e1 commit fe00d25

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎tests/git-auto-commit.bats‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,3 +1092,23 @@ cat_github_output() {
10921092
assert_failure;
10931093
assert_line "::error::git-auto-commit could not find git binary. Please make sure git is available."
10941094
}
1095+
1096+
@test "It creates multi-line commit messages" {
1097+
touch "${FAKE_LOCAL_REPOSITORY}"/new-file-{1,2,3}.txt
1098+
1099+
COMMIT_MESSAGE=$(cat <<-END
1100+
this commit message
1101+
has multiple lines
1102+
END
1103+
)
1104+
1105+
INPUT_COMMIT_MESSAGE=$COMMIT_MESSAGE
1106+
1107+
run git_auto_commit
1108+
1109+
assert_success
1110+
1111+
# Assert last commit was signed off
1112+
run git log -n 1
1113+
assert_output --partial $COMMIT_MESSAGE
1114+
}

0 commit comments

Comments
 (0)