Skip to content

Commit

Permalink
FileConventions.Tests: add failing test
Browse files Browse the repository at this point in the history
Add failing test for WrapText function based on [1].

[1] nblockchain#117
  • Loading branch information
parhamsaremi committed Aug 8, 2023
1 parent 4597044 commit 4f76c3d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/FileConventions.Test/WrapTextTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -107,3 +107,24 @@ let WrapTextTest5() =
let expectedResult = text

Assert.That(WrapText text characterCount, Is.EqualTo expectedResult)

[<Test>]
let WrapTextTest6() =
let characterCount = 64
let commitMsg =
"foo: this is a header"
+ Environment.NewLine
+ Environment.NewLine
+ "This is a body:"
+ Environment.NewLine
+ Environment.NewLine
+ "```"
+ Environment.NewLine
+ "A code block that has two conditions, it has a very long line that exceeds the limit."
+ Environment.NewLine
+ Environment.NewLine
+ "It also has multiple paragraphs."
+ Environment.NewLine
+ "```"

Assert.That(WrapText commitMsg characterCount, Is.EqualTo commitMsg)

0 comments on commit 4f76c3d

Please sign in to comment.