aboutsummaryrefslogtreecommitdiff
path: root/markdown/ast_paragraph_test.go
blob: 4479cbc441f375737c761f6ad99e04518ff9cee3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package markdown

import "testing"

func TestParagraph(t *testing.T) {
	content := "bonsoir"
	lxs := lex(content)
	tree, err := ast(lxs)
	if err != nil {
		t.Fatal(err)
	}
	c, err := tree.Eval()
	if err != nil {
		t.Fatal(err)
	}
	if c != "<p>bonsoir</p>" {
		t.Errorf("failed, got %s", c)
		t.Logf("lxs: %s\ntree: %s", lxs, tree)
	}
}