blob: e9a320259e4d51b8d79412f4cbb5d31097e4f954 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package markdown
import "testing"
func TestQuote(t *testing.T) {
content := `
> Bonsoir, je suis un **code**
avec une source
`
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 != `<div class="quote"><blockquote>Bonsoir, je suis un <b>code</b></blockquote><p>avec une source</p></div>` {
t.Errorf("failed, got %s", c)
t.Logf("lxs: %s\ntree: %s", lxs, tree)
}
}
|