Skip to content

Commit

Permalink
some more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
onionpancakes committed Feb 19, 2024
1 parent 6cddcbb commit 5663930
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/dev/onionpancakes/chassis/tests/test_compiler.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
[dev.onionpancakes.chassis.compiler :as cc]
[clojure.test :refer [deftest are is]]))

(def example-constant
"foobar")

(def example-deref
(delay "foobar"))

Expand Down Expand Up @@ -41,6 +44,7 @@
[:div.123 "foo"]
[:div#foo.123 "foo"]
[:div [:p 123] [:p 456]]
[:div example-constant]
[:div example-deref]
[:div example-fn]
[:div nil]
Expand All @@ -58,6 +62,9 @@
[::Foo nil]
[::Foo nil "foobar"]
[::Foo nil "foo" [::Foo "bar"]]
[::Foo {:foo "bar"}]
[::Foo example-fn]
[::Foo#foo.bar]
[c/doctype-html5 [:div "foo" c/nbsp "bar"]]))

(deftest test-compile-full-compaction
Expand All @@ -68,6 +75,8 @@
""
[:div]
[:div#foo.bar "123"]
[:div {:foo "bar"} "123"]
[:div {:foo example-constant}]
[:div [:p "foo"] [:p "bar"]]
[:div [:p "foo"] (example-elem-macro "123") [:p "bar"]]
[c/doctype-html5 [:div "foo" c/nbsp "bar"]]))

0 comments on commit 5663930

Please sign in to comment.