aboutsummaryrefslogtreecommitdiff
path: root/markdown/ast_quote_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'markdown/ast_quote_test.go')
-rw-r--r--markdown/ast_quote_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/markdown/ast_quote_test.go b/markdown/ast_quote_test.go
new file mode 100644
index 0000000..e9a3202
--- /dev/null
+++ b/markdown/ast_quote_test.go
@@ -0,0 +1,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)
+ }
+}