mirror of
https://github.com/status-im/markdown.git
synced 2025-02-22 08:08:18 +00:00
40 lines
690 B
Go
40 lines
690 B
Go
//
|
|
// Markdown Processor for Go
|
|
// Available at https://github.com/gomarkdown/markdown
|
|
//
|
|
// 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 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)
|
|
}
|