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