tests: Test that keywords do not clash with normal strings
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
This commit is contained in:
parent
702811c69a
commit
2ea2cd1a8d
@ -517,6 +517,12 @@
|
|||||||
(assert (= (get {:foo "bar"} :foo) "bar"))
|
(assert (= (get {:foo "bar"} :foo) "bar"))
|
||||||
(assert (= (get {:bar "quux"} (get {:foo :bar} :foo)) "quux")))
|
(assert (= (get {:bar "quux"} (get {:foo :bar} :foo)) "quux")))
|
||||||
|
|
||||||
|
(defn test-keyword-clash []
|
||||||
|
"NATIVE: test that keywords do not clash with normal strings"
|
||||||
|
|
||||||
|
(assert (= (get {:foo "bar" ":foo" "quux"} :foo) "bar"))
|
||||||
|
(assert (= (get {:foo "bar" ":foo" "quux"} ":foo") "quux")))
|
||||||
|
|
||||||
(defn test-eval []
|
(defn test-eval []
|
||||||
"NATIVE: test eval"
|
"NATIVE: test eval"
|
||||||
(assert (= 2 (eval (quote (+ 1 1)))))
|
(assert (= 2 (eval (quote (+ 1 1)))))
|
||||||
|
Loading…
Reference in New Issue
Block a user