Ver Fonte

add tests

Tienson Qin há 2 anos atrás
pai
commit
bccf5888c7

+ 9 - 0
deps/graph-parser/test/logseq/graph_parser/mldoc_test.cljs

@@ -119,6 +119,15 @@ body"
       (is ["@tag" "tag1" "tag2"] (sort (:filetags props)))
       (is ["@tag" "tag1" "tag2" "tag3"] (sort (:tags props))))))
 
+(deftest remove-indentation-spaces
+  (testing "Remove indentations for every line"
+    (let [s "block 1.1
+    line 1
+      line 2
+ line 3
+line 4"]
+      (= (gp-mldoc/remove-indentation-spaces s 2 false) "block 1.1\n  line 1\n    line 2\nline 3\nline 4"))))
+
 (deftest ^:integration test->edn
   (let [graph-dir "test/docs-0.9.2"
         _ (docs-graph-helper/clone-docs-repo-if-not-exists graph-dir "v0.9.2")