From 2ea2cd1a8dc74c7570df8d01e792b018401bc7fd Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 11 Apr 2013 11:46:52 +0200 Subject: [PATCH] tests: Test that keywords do not clash with normal strings Signed-off-by: Gergely Nagy --- tests/native_tests/language.hy | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/native_tests/language.hy b/tests/native_tests/language.hy index ab71791..f4c0e1c 100644 --- a/tests/native_tests/language.hy +++ b/tests/native_tests/language.hy @@ -517,6 +517,12 @@ (assert (= (get {:foo "bar"} :foo) "bar")) (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 [] "NATIVE: test eval" (assert (= 2 (eval (quote (+ 1 1)))))