mirror of
https://github.com/danog/blackfriday.git
synced 2024-11-30 04:29:13 +01:00
646308596a
Fixes #475
40 lines
698 B
Go
40 lines
698 B
Go
//
|
|
// Blackfriday Markdown Processor
|
|
// Available at http://github.com/russross/blackfriday
|
|
//
|
|
// Copyright © 2011 Russ Ross <russ@russross.com>.
|
|
// Distributed under the Simplified BSD License.
|
|
// See README.md for details.
|
|
//
|
|
|
|
//
|
|
// Unit tests for full document parsing and rendering
|
|
//
|
|
|
|
package blackfriday
|
|
|
|
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)
|
|
}
|