Permalink
Browse files

Add some unit tests to verify some corner cases for the symbol clojur…

…e.core//

It shows up as a special case just about everywhere.
  • Loading branch information...
1 parent 314b879 commit 20327f34e1b617ac784a86c264e0d3413137ad83 @jafingerhut jafingerhut committed May 27, 2012
Showing with 13 additions and 2 deletions.
  1. +13 −2 test/clj_ns_browser/test/core.clj
@@ -1,6 +1,17 @@
(ns clj-ns-browser.test.core
+ (:require [clj-ns-browser.browser :as b]
+ [clj-ns-browser.utils :as u])
(:use [clj-ns-browser.core])
(:use [clojure.test]))
-(deftest replace-me ;; FIXME: write
- (is false "No tests have been written."))
+(deftest slash-symbol-fixup-checks
+ (is (= "Function"
+ (:object-type-str (b/better-get-docs-map "clojure.core//"))))
+ (is (= #'clojure.core// (u/resolve-fqname "clojure.core//")))
+ (is (= #'clojure.core// (u/resolve-fqname "clojure.core" "/")))
+ (is (= "clojure.core//" (u/fqname 'clojure.core//)))
+ (is (= "clojure.core//" (u/fqname '/)))
+ (is (= "clojure.core//"
+ (re-find #"^clojure\.core//"
+ (u/render-one-doc-text "clojure.core//" "Doc"))))
+ )

0 comments on commit 20327f3

Please sign in to comment.