-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add comment test cases Signed-off-by: Miloslav Trmač <[email protected]>
- Loading branch information
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -398,6 +398,20 @@ July 2014, updated by Sven Dowideit ([email protected]) | |
doTestsInline(t, tests) | ||
} | ||
|
||
func TestComments(t *testing.T) { | ||
blockTests := []string{ | ||
"First paragraph\n\n<!-- Comment, HTML should be separated by blank lines -->\n\nSecond paragraph\n", | ||
".nh\n\n.PP\nFirst paragraph\n\n.PP\nSecond paragraph\n", | ||
} | ||
doTestsParam(t, blockTests, TestParams{}) | ||
|
||
inlineTests := []string{ | ||
"Text with a com<!--...-->ment in the middle\n", | ||
".nh\n\n.PP\nText with a comment in the middle\n", | ||
} | ||
doTestsInlineParam(t, inlineTests, TestParams{}) | ||
} | ||
|
||
func execRecoverableTestSuite(t *testing.T, tests []string, params TestParams, suite func(candidate *string)) { | ||
// Catch and report panics. This is useful when running 'go test -v' on | ||
// the integration server. When developing, though, crash dump is often | ||
|