27 lines
404 B
Go
27 lines
404 B
Go
package markdown
|
|
|
|
import "testing"
|
|
|
|
func TestDocument(t *testing.T) {
|
|
t.Parallel()
|
|
var tests = []string{
|
|
// Empty document.
|
|
"",
|
|
"",
|
|
|
|
" ",
|
|
"",
|
|
|
|
// This shouldn't panic.
|
|
// https://github.com/russross/blackfriday/issues/172
|
|
"[]:<",
|
|
"<p>[]:<</p>\n",
|
|
|
|
// This shouldn't panic.
|
|
// https://github.com/russross/blackfriday/issues/173
|
|
" [",
|
|
"<p>[</p>\n",
|
|
}
|
|
doTests(t, tests)
|
|
}
|