mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
add one more parsing testcase
This commit is contained in:
parent
4025b1e29c
commit
7d479e95b1
1 changed files with 16 additions and 2 deletions
|
|
@ -33,6 +33,13 @@ Some surounding &[](./simple.md) text")
|
||||||
"# Heading1
|
"# Heading1
|
||||||
&[ :indent-heading 2 :indent-list 33 ](./with-heading-and-list.md)")
|
&[ :indent-heading 2 :indent-list 33 ](./with-heading-and-list.md)")
|
||||||
|
|
||||||
|
(def multi
|
||||||
|
"# Heading1
|
||||||
|
&[ :indent-heading 2 :indent-list 33 ](./with-heading-and-list.md)
|
||||||
|
some text
|
||||||
|
&[](./simple.md)
|
||||||
|
more text.")
|
||||||
|
|
||||||
|
|
||||||
(deftest test-parse-include-md
|
(deftest test-parse-include-md
|
||||||
(testing "parse include links"
|
(testing "parse include links"
|
||||||
|
|
@ -64,9 +71,16 @@ Some surounding &[](./simple.md) text")
|
||||||
(sut/parse-include-md
|
(sut/parse-include-md
|
||||||
include-invalid-indent)))
|
include-invalid-indent)))
|
||||||
(is
|
(is
|
||||||
(= [{:uri "./with-heading-and-list.md", :indent-heading 2, :indent-list 0}]
|
(= [{:uri "./with-heading-and-list.md", :indent-heading 2, :indent-list 3}]
|
||||||
(sut/parse-include-md
|
(sut/parse-include-md
|
||||||
include-spaced-indent)))))
|
include-spaced-indent)))
|
||||||
|
(is
|
||||||
|
(= [{:uri "./with-heading-and-list.md",
|
||||||
|
:indent-heading 2,
|
||||||
|
:indent-list 3}
|
||||||
|
{:uri "./simple.md", :indent-heading 0, :indent-list 0}]
|
||||||
|
(sut/parse-include-md
|
||||||
|
multi)))))
|
||||||
|
|
||||||
(s/defmethod resolver/do-resolve-md :test-mock
|
(s/defmethod resolver/do-resolve-md :test-mock
|
||||||
[resolver
|
[resolver
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue