Skip to content

Commit

Permalink
fixup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
camdencheek committed Apr 9, 2024
1 parent df6a231 commit c833d31
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions web/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ func TestContextLines(t *testing.T) {
Post: "th",
},
},
Before: "second snippet\nthird thing",
After: "fifth block\nsixth example",
Before: "second snippet\nthird thing\n",
After: "fifth block\nsixth example\n",
},
},
},
Expand All @@ -456,7 +456,7 @@ func TestContextLines(t *testing.T) {
Post: " line",
},
},
After: "second snippet\nthird thing",
After: "second snippet\nthird thing\n",
},
},
},
Expand All @@ -477,7 +477,7 @@ func TestContextLines(t *testing.T) {
Post: "",
},
},
Before: "fifth block\nsixth example",
Before: "fifth block\nsixth example\n",
},
},
},
Expand All @@ -498,7 +498,7 @@ func TestContextLines(t *testing.T) {
Post: "",
},
},
Before: "one line\nsecond snippet\nthird thing\nfourth\nfifth block\nsixth example",
Before: "one line\nsecond snippet\nthird thing\nfourth\nfifth block\nsixth example\n",
},
},
},
Expand Down Expand Up @@ -539,8 +539,8 @@ func TestContextLines(t *testing.T) {
Match: "trois",
},
},
Before: "un \n ",
After: " \n",
Before: "un \n \n",
After: " \n\n",
},
},
},
Expand All @@ -561,13 +561,8 @@ func TestContextLines(t *testing.T) {
Post: " in the no later bla",
},
},
// Returns 3 instead of 4 new line characters since we swallow
// the last new line in Before, Fragments and After.
Before: "\n\n\n",
// Returns 2 instead of 3 new line characters since a
// trailing newline at the end of the file does not
// constitue a new line.
After: "\n\n",
Before: "\n\n\n\n",
After: "\n\n\n",
},
},
},
Expand All @@ -587,8 +582,8 @@ func TestContextLines(t *testing.T) {
Match: "pastures",
},
},
Before: "green",
After: "",
Before: "green\n",
After: "\n",
},
},
},
Expand Down

0 comments on commit c833d31

Please sign in to comment.