add more edge case for git commit message trailer

This commit is contained in:
wxiaoguang
2026-06-15 15:38:03 +08:00
parent c8e0ebe74d
commit c7474fdb73
3 changed files with 4 additions and 8 deletions

View File

@@ -26,6 +26,7 @@ func TestCommitMessageTrailer(t *testing.T) {
{"a", "a", "", ""},
{"a\n\nk", "a\n\nk", "", ""},
{"a\n\nk:v", "a", "\n\n", "k:v"},
{"a\n\nk:v\n\n", "a", "\n\n", "k:v\n\n"},
{"a\n--\nk:v", "a\n--\nk:v", "", ""},
{"a\n---\nk:v", "a", "\n---\n", "k:v"},