diff options
Diffstat (limited to 'mardown/ast_external_test.go')
| -rw-r--r-- | mardown/ast_external_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mardown/ast_external_test.go b/mardown/ast_external_test.go index fc0597d..afae085 100644 --- a/mardown/ast_external_test.go +++ b/mardown/ast_external_test.go @@ -28,4 +28,22 @@ func TestExternal(t *testing.T) { if string(got) != `<figure><img alt="image alt" src="image src"></figure>` { t.Errorf("invalid value, got %s", got) } + + lxs = lex(` + +source 1 +source 2 +`) + tree, err = ast(lxs) + if err != nil { + t.Fatal(err) + } + got, err = tree.Eval() + if err != nil { + t.Fatal(err) + } + if string(got) != `<figure><img alt="image alt" src="image src"><figcaption>source 1 source 2</figcaption></figure>` { + t.Errorf("invalid value, got %s", got) + } + } |
