@@ -100,6 +100,43 @@ def test_get_commits_without_email(mocker):
100
100
assert commits [1 ].title == "feat(users): add username"
101
101
102
102
103
+ def test_get_commits_without_breakline_in_each_commit (mocker ):
104
+ raw_commit = (
105
+ "ae9ba6fc5526cf478f52ef901418d85505109744\n "
106
+ "bump: version 2.13.0 → 2.14.0\n "
107
+ "GitHub Action\n "
108
+ "action@github.com\n "
109
+ "----------commit-delimiter----------\n "
110
+ "ff2f56ca844de72a9d59590831087bf5a97bac84\n "
111
+ "Merge pull request #332 from cliles/feature/271-redux\n "
112
+ "User\n "
113
+ "user@email.com\n "
114
+ "Feature/271 redux----------commit-delimiter----------\n "
115
+ "20a54bf1b82cd7b573351db4d1e8814dd0be205d\n "
116
+ "feat(#271): enable creation of annotated tags when bumping\n "
117
+ "User 2\n "
118
+ "user@email.edu\n "
119
+ "----------commit-delimiter----------\n "
120
+ )
121
+ mocker .patch ("commitizen.cmd.run" , return_value = FakeCommand (out = raw_commit ))
122
+
123
+ commits = git .get_commits ()
124
+
125
+ assert commits [0 ].author == "GitHub Action"
126
+ assert commits [1 ].author == "User"
127
+ assert commits [2 ].author == "User 2"
128
+
129
+ assert commits [0 ].author_email == "action@github.com"
130
+ assert commits [1 ].author_email == "user@email.com"
131
+ assert commits [2 ].author_email == "user@email.edu"
132
+
133
+ assert commits [0 ].title == "bump: version 2.13.0 → 2.14.0"
134
+ assert commits [1 ].title == "Merge pull request #332 from cliles/feature/271-redux"
135
+ assert (
136
+ commits [2 ].title == "feat(#271): enable creation of annotated tags when bumping"
137
+ )
138
+
139
+
103
140
def test_get_tag_names_has_correct_arrow_annotation ():
104
141
arrow_annotation = inspect .getfullargspec (git .get_tag_names ).annotations ["return" ]
105
142
0 commit comments