Skip to content

Commit

Permalink
add tests for last checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
Replit user committed Sep 22, 2023
1 parent 14b1601 commit 5421fef
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions block_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package markdown

import (
"bytes"
"testing"
"github.com/gomarkdown/markdown/ast"
"github.com/gomarkdown/markdown/html"
"github.com/gomarkdown/markdown/parser"
"testing"
)

func TestPrefixHeaderNoExtensions(t *testing.T) {
Expand Down Expand Up @@ -193,7 +193,7 @@ func TestBug126(t *testing.T) {
var buf bytes.Buffer
ast.Print(&buf, doc)
got := buf.String()
// TODO: needs fixing https://github.com/gomarkdown/markdown/issues/126
// TODO: needs fixing https://github.com/gomarkdown/markdown/issues/126
exp := "BlockQuote\n CodeBlock: '> fenced pre block 1\\n> ```\\n\\n'\n Paragraph\n Text 'fenced pre block 2\\n````'\n"
if got != exp {
t.Errorf("\nInput [%#v]\nExpected[%#v]\nGot [%#v]\n",
Expand All @@ -214,3 +214,20 @@ func TestPull288(t *testing.T) {
input, exp, got)
}
}

func TestSec1(t *testing.T) {
ext := parser.CommonExtensions |
parser.Attributes |
parser.OrderedListStart |
parser.SuperSubscript |
parser.Mmark

tests := []string{
"[@]", "[#]", "[@", "[#", "[@@]", "[@#]",
}
for _, test := range tests {
p := parser.NewWithExtensions(ext)
inp := []byte(test)
ToHTML(inp, p, nil)
}
}

0 comments on commit 5421fef

Please sign in to comment.