Skip to content

Commit

Permalink
Made tests more readable, also added all bullet cases
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbilas committed Nov 3, 2023
1 parent 7125994 commit 137d064
Showing 1 changed file with 108 additions and 13 deletions.
121 changes: 108 additions & 13 deletions src/Core/DocoptUtility.t.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,24 +158,119 @@ public void Reflow_WithSecondIndentation()
public void Reflow_WithBulletPoints()
{
Reflow(
"here is\n * one point\n and this won't! join", 16).ShouldBe(
"here is\n * one point\n and this\n won't! join");
Reflow(
"here is\n * one point\n and this won't! join", 18).ShouldBe(
"here is\n * one point and\n this won't!\n join");
"here is\n"+
" * one point\n"+
" and this won't! join", 16).ShouldBe(
"here is\n"+
" * one point\n"+
" and this\n"+
" won't! join");
Reflow(
"here is\n"+
" * one point\n"+
" and this won't! join", 18).ShouldBe(
"here is\n"+
" * one point and\n"+
" this won't!\n"+
" join");
Reflow(
"here is\n"+
" * one point\n"+
" and this should join", 50).ShouldBe(
"here is\n"+
" * one point and this should join");

Reflow(
"here is\n * one point\n and this should join", 50).ShouldBe(
"here is\n * one point and this should join");
"here is\n"+
" - one point\n"+
" and this won't! join", 16).ShouldBe(
"here is\n"+
" - one point\n"+
" and this\n"+
" won't! join");
Reflow(
"here is\n"+
" - one point\n"+
" and this won't! join", 18).ShouldBe(
"here is\n"+
" - one point and\n"+
" this won't!\n"+
" join");
Reflow(
"here is\n"+
" - one point\n"+
" and this should join", 50).ShouldBe(
"here is\n"+
" - one point and this should join");

Reflow(
"here is\n - one point\n and this won't! join", 16).ShouldBe(
"here is\n - one point\n and this\n won't! join");
"here is\n"+
" # one point\n"+
" and this won't! join", 16).ShouldBe(
"here is\n"+
" # one point\n"+
" and this\n"+
" won't! join");
Reflow(
"here is\n"+
" # one point\n"+
" and this won't! join", 18).ShouldBe(
"here is\n"+
" # one point and\n"+
" this won't!\n"+
" join");
Reflow(
"here is\n"+
" # one point\n"+
" and this should join", 50).ShouldBe(
"here is\n"+
" # one point and this should join");

Reflow(
"here is\n - one point\n and this won't! join", 18).ShouldBe(
"here is\n - one point and\n this won't!\n join");
"here is\n"+
" // one point\n"+
" and this won't! join", 16).ShouldBe(
"here is\n"+
" // one point\n"+
" and this\n"+
" won't! join");
Reflow(
"here is\n"+
" // one point\n"+
" and this won't! join", 19).ShouldBe(
"here is\n"+
" // one point and\n"+
" this won't!\n"+
" join");
Reflow(
"here is\n"+
" // one point\n"+
" and this should join", 50).ShouldBe(
"here is\n"+
" // one point and this should join");

Reflow(
"here is\n - one point\n and this should join", 50).ShouldBe(
"here is\n - one point and this should join");
"here is\n"+
" 1. one point\n"+
" and this won't! join", 16).ShouldBe(
"here is\n"+
" 1. one point\n"+
" and this\n"+
" won't! join");
Reflow(
"here is\n"+
" 2. one point\n"+
" and this won't! join", 18).ShouldBe(
"here is\n"+
" 2. one point and\n"+
" this won't!\n"+
" join");
Reflow(
"here is\n"+
" 3. one point\n"+
" and this should join", 50).ShouldBe(
"here is\n"+
" 3. one point and this should join");
}

[Test]
Expand Down

0 comments on commit 137d064

Please sign in to comment.