git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC/PATCH 2/3] mailinfo: correct malformed test example

From
JTJonathan Tan <jonathantanmy@google.com>
Date
Sep 16, 2016, 17:37 UTC
Message-ID
<5dbb0b0f64906fd18c217908cd2c04e74d80fa68.1474047135.git.jonathantanmy@google.com>
In-Reply-To
<cover.1474047135.git.jonathantanmy@google.com>

An existing sample message (0015) in the tests for mailinfo contains an indented line immediately after an in-body header (without any intervening blank line). Correct this by adding the blank line, in preparation for a subsequent patch that will treat such indented lines as RFC 2822 continuation lines (instead of as part of the commit message).

To ensure that non-indented lines immediately after an in-body header are still treated correctly (now and in the future), 0008 has been updated to test both the case when in-body headers are used and the case when they are not used.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
---
 t/t5100/info0008--no-inbody-headers  | 5 +++++
 t/t5100/msg0008--no-inbody-headers   | 6 ++++++
 t/t5100/msg0015--no-inbody-headers   | 1 +
 t/t5100/patch0008--no-inbody-headers | 0
 t/t5100/sample.mbox                  | 1 +
 5 files changed, 13 insertions(+)
 create mode 100644 t/t5100/info0008--no-inbody-headers
 create mode 100644 t/t5100/msg0008--no-inbody-headers
 create mode 100644 t/t5100/patch0008--no-inbody-headers
diff --git a/t/t5100/info0008--no-inbody-headers b/t/t5100/info0008--no-inbody-headers
new file mode 100644
index 0000000..e8a2951
--- /dev/null
+++ b/t/t5100/info0008--no-inbody-headers
@@ -0,0 +1,5 @@
+Author: Junio C Hamano
+Email: junio@kernel.org
+Subject: another patch
+Date: Fri, 9 Jun 2006 00:44:16 -0700
+
diff --git a/t/t5100/msg0008--no-inbody-headers b/t/t5100/msg0008--no-inbody-headers
new file mode 100644
index 0000000..d6e950e
--- /dev/null
+++ b/t/t5100/msg0008--no-inbody-headers
@@ -0,0 +1,6 @@
+From: A U Thor <a.u.thor@example.com>
+Subject: [PATCH] another patch
+>Here is an empty patch from A U Thor.
+
+Hey you forgot the patch!
+
diff --git a/t/t5100/msg0015--no-inbody-headers b/t/t5100/msg0015--no-inbody-headers
index be5115b..44a6ce7 100644
--- a/t/t5100/msg0015--no-inbody-headers
+++ b/t/t5100/msg0015--no-inbody-headers
@@ -1,3 +1,4 @@
 From: bogosity
+
   - a list
   - of stuff
diff --git a/t/t5100/patch0008--no-inbody-headers b/t/t5100/patch0008--no-inbody-headers
new file mode 100644
index 0000000..e69de29
diff --git a/t/t5100/sample.mbox b/t/t5100/sample.mbox
index 8b2ae06..ba8b208 100644
--- a/t/t5100/sample.mbox
+++ b/t/t5100/sample.mbox
@@ -656,6 +656,7 @@ Subject: check bogus body header (from)
 Date: Fri, 9 Jun 2006 00:44:16 -0700
 
 From: bogosity
+
   - a list
   - of stuff
 ---
-- 
2.10.0.rc2.20.g5b18e70
Previous: Jeff KingNext: Junio C Hamano
Message 10 of 24 in “sequencer: support folding in rfc2822 footer”
  1. sequencer: support folding in rfc2822 footerJonathan Tan, Sep 2, 2016
  2. Junio C HamanoSep 3, 2016
  3. Jonathan TanSep 6, 2016
  4. Jonathan TanSep 6, 2016
  5. Jeff KingSep 7, 2016
  6. 0/3 handle multiline in-body headersJonathan Tan, Sep 16, 2016
  7. 1/3 mailinfo: refactor commit message processingJonathan Tan, Sep 16, 2016
  8. Junio C HamanoSep 16, 2016
  9. Jeff KingSep 16, 2016
  10. 2/3 mailinfo: correct malformed test exampleJonathan Tan, Sep 16, 2016
  11. Junio C HamanoSep 16, 2016
  12. Jonathan TanSep 16, 2016
  13. Junio C HamanoSep 16, 2016
  14. Jonathan TanSep 17, 2016
  15. Junio C HamanoSep 17, 2016
  16. 3/3 mailinfo: handle in-body header continuationsJonathan Tan, Sep 16, 2016
  17. Junio C HamanoSep 16, 2016
  18. Jonathan TanSep 16, 2016
  19. Junio C HamanoSep 16, 2016
  20. Jonathan TanSep 16, 2016
  21. Junio C HamanoSep 16, 2016
  22. Jonathan TanSep 17, 2016
  23. Jeff KingSep 16, 2016
  24. Junio C HamanoSep 16, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.