fix: remove-properties!

This commit is contained in:
Tienson Qin
2021-04-30 19:10:49 +08:00
parent b8af6e7e53
commit dc6acbab6c
4 changed files with 54 additions and 45 deletions

View File

@@ -110,17 +110,17 @@
[]
(testing "properties with non-blank lines"
(are [x y] (= x y)
(text/remove-properties! "** hello\n:PROPERTIES:\n:x: y\n:END:\n")
(text/remove-properties! :org "** hello\n:PROPERTIES:\n:x: y\n:END:\n")
"** hello"
(text/remove-properties! "** hello\n:PROPERTIES:\n:x: y\na:b\n:END:\n")
(text/remove-properties! :org "** hello\n:PROPERTIES:\n:x: y\na:b\n:END:\n")
"** hello"))
(testing "properties with blank lines"
(are [x y] (= x y)
(text/remove-properties! "** hello\n:PROPERTIES:\n\n:x: y\n:END:\n")
(text/remove-properties! :org "** hello\n:PROPERTIES:\n\n:x: y\n:END:\n")
"** hello"
(text/remove-properties! "** hello\n:PROPERTIES:\n:x: y\n\na:b\n:END:\n")
(text/remove-properties! :org "** hello\n:PROPERTIES:\n:x: y\n\na:b\n:END:\n")
"** hello")))
(defn test-insert-property