From 5663930e83af894b156bbb3f7d015d43d9304074 Mon Sep 17 00:00:00 2001 From: onionpancakes <639985+onionpancakes@users.noreply.github.com> Date: Mon, 19 Feb 2024 01:12:52 -0800 Subject: [PATCH] some more tests --- test/dev/onionpancakes/chassis/tests/test_compiler.clj | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/dev/onionpancakes/chassis/tests/test_compiler.clj b/test/dev/onionpancakes/chassis/tests/test_compiler.clj index f200b39..551d6f7 100644 --- a/test/dev/onionpancakes/chassis/tests/test_compiler.clj +++ b/test/dev/onionpancakes/chassis/tests/test_compiler.clj @@ -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")) @@ -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] @@ -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 @@ -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"]]))