diff options
-rw-r--r-- | src/test/clojure/clojure/contrib/test_string.clj | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/clojure/clojure/contrib/test_string.clj b/src/test/clojure/clojure/contrib/test_string.clj index 5b734a4a..98f03a78 100644 --- a/src/test/clojure/clojure/contrib/test_string.clj +++ b/src/test/clojure/clojure/contrib/test_string.clj @@ -113,3 +113,12 @@ (deftest t-get (is (= \o (s/get "foo" 1)))) +(deftest t-as-str + (testing "keyword to string" + (is (= "foo") (s/as-str :foo))) + (testing "symbol to string" + (is (= "foo") (s/as-str 'foo))) + (testing "string to string" + (is (= "foo") (s/as-str "foo"))) + (testing "stringifying non-namish things" + (is (= "42") (s/as-str 42)))) |