aboutsummaryrefslogtreecommitdiff
path: root/mardown/ast_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'mardown/ast_test.go')
-rw-r--r--mardown/ast_test.go21
1 files changed, 20 insertions, 1 deletions
diff --git a/mardown/ast_test.go b/mardown/ast_test.go
index b270b18..d9033c2 100644
--- a/mardown/ast_test.go
+++ b/mardown/ast_test.go
@@ -17,7 +17,9 @@ func TestAst(t *testing.T) {
t.Errorf("failed, got %s", c)
t.Logf("lxs: %s\ntree: %s", lxs, tree)
}
- content = "***bon*soir**"
+ content = `
+***bon*soir**
+`
lxs = lex(content)
tree, err = ast(lxs)
if err != nil {
@@ -45,4 +47,21 @@ func TestAst(t *testing.T) {
t.Errorf("failed, got %s", c)
t.Logf("lxs: %s\ntree: %s", lxs, tree)
}
+ 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)
+ }
}