Skip to content

Commit 4429424

Browse files
committed
test: Add case for autogenerated commit trailers
1 parent bffa6de commit 4429424

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

test/validation.bats

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,31 @@ EOF
9595
assert_success
9696
}
9797

98+
99+
@test "validation: auto generated trailers does not show warnings" {
100+
echo "n" > $FAKE_TTY
101+
run git commit -m "$(cat <<EOF
102+
Summarize change in around 50 characters or less
103+
104+
More detailed explanatory text, if necessary. Wrap it to about 72
105+
characters or so. In some contexts, the first line is treated as the
106+
subject of the commit and the rest of the text as the body. The
107+
blank line separating the summary from the body is critical (unless
108+
you omit the body entirely); various tools like `log`, `shortlog`
109+
and `rebase` can get confused if you run the two together.
110+
111+
112+
Bug: 123
113+
See-also: HEAD
114+
Co-Authored-by: John Doe <[email protected]>
115+
Acked-by: Jane Doe <[email protected]>
116+
Reference-to: f000e67 (Merge pull request #2 from tommarshall/ignore-trailing-whitespace, 2016-09-29)
117+
See-also: f000e679cfe3ac (Merge pull request #2 from tommarshall/ignore-trailing-whitespace)
118+
EOF
119+
)"
120+
121+
assert_success
122+
}
98123
# 1. Separate subject from body with a blank line
99124
# ------------------------------------------------------------------------------
100125

0 commit comments

Comments
 (0)