Skip to content

Latest commit

 

History

History
23 lines (23 loc) · 1.24 KB

core_test.org

File metadata and controls

23 lines (23 loc) · 1.24 KB

Tests

load?

(deftest test-load?
  (let [load? #'literate-clojure.core/load?
        read-org-code-block-header-arguments #'literate-clojure.core/read-org-code-block-header-arguments]
    (is (load? (read-org-code-block-header-arguments "#+begin_src clojure")))
    (is (load? (read-org-code-block-header-arguments "  #+begin_src clojure  ")))
    (is (load? (read-org-code-block-header-arguments " #+begin_src clojure :load yes")))
    (is (load? (read-org-code-block-header-arguments " #+begin_src clojure :load yes  ")))
    (is (load? (read-org-code-block-header-arguments " #+begin_src clojure :load yes  ")))
    (is (load? (read-org-code-block-header-arguments " #+begin_src clojurescript :load yes  ")))
    (is (not (load? (read-org-code-block-header-arguments " #+begin_src clojurescript :load no"))))
    (is (not (load? (read-org-code-block-header-arguments " #+begin_src clojure :load no"))))
    (is (not (load? (read-org-code-block-header-arguments " #+begin_src clojure :load no "))))))

tools.reader

(deftest test-tools.reader
  (is (not (clojure.tools.reader/read-string {:eof nil} "# x" ))))