summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test
diff options
context:
space:
mode:
authorIvan Frade <ifrade@google.com>2024-01-09 17:41:58 +0000
committerGerrit Code Review <support@gerrithub.io>2024-01-09 17:41:58 +0000
commitef53cb8a9f15d5548bfbb3d4da479104c081e747 (patch)
tree8ee41e5284a9b9b5ec454b12f719f7500050b58a /org.eclipse.jgit.test
parentb1cc74b75b771279d81de15833da514c71513648 (diff)
parent8116f66b9c8e032ef0a2c14e5b242e710ae0d323 (diff)
downloadjgit-ef53cb8a9f15d5548bfbb3d4da479104c081e747.tar.gz
jgit-ef53cb8a9f15d5548bfbb3d4da479104c081e747.zip
Merge "FooterLines: handle extraction from messages without headers"
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/FooterLineTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/FooterLineTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/FooterLineTest.java
index a6808f6351..cac0743d68 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/FooterLineTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/FooterLineTest.java
@@ -98,6 +98,15 @@ public class FooterLineTest extends RepositoryTestCase {
}
@Test
+ public void testOneFooter_longSubject_NoHeaders() {
+ String noRawMsg = "50+ chars loooooooooooooong custom commit message.\n\n"
+ + "Footer: value\n";
+ List<FooterLine> footers = FooterLine.fromMessage(noRawMsg);
+ assertNotNull(footers);
+ assertEquals(1, footers.size());
+ }
+
+ @Test
public void testSignedOffBy_OneUserNoLF() {
String msg = buildMessage("subject\n\nbody of commit\n" + "\n"
+ "Signed-off-by: A. U. Thor <a@example.com>");