From 07342b5ac4387584097caecee7d05107cf9d3fa8 Mon Sep 17 00:00:00 2001 From: jem Date: Fri, 18 May 2018 17:13:33 +0200 Subject: [PATCH] implemented includes-resolving for tests --- test/smeagol/test/include.clj | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/test/smeagol/test/include.clj b/test/smeagol/test/include.clj index 628ad75..dc477c9 100644 --- a/test/smeagol/test/include.clj +++ b/test/smeagol/test/include.clj @@ -44,7 +44,15 @@ more text.") [resolver uri :- s/Str] (cond - (= uri "./simple.md") "Simple content.")) + (= uri "./simple.md") "Simple content." + (= uri "./with-heading-and-list.md") "# Heading2 +some text +* List + +## Heading 3 +more text")) + + (def system-under-test (component/start @@ -64,4 +72,21 @@ more text.") Simple content." (sut/expand-include-md (:includer system-under-test) - include-simple))))) + include-simple))) + (is + (= "# Heading1 +Some surounding Simple content. text" + (sut/expand-include-md + (:includer system-under-test) + include-surounding-simple))) + (is + (= "# Heading1 +# Heading2 +some text +* List + +## Heading 3 +more text" + (sut/expand-include-md + (:includer system-under-test) + include-heading-list-0)))))