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

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)
	}
}