Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added test for swank-hyperdoc

  • Loading branch information...
commit 673e5c4a4656c1210d9527119d887e94a449c6a3 1 parent d737d9d
@hugoduncan hugoduncan authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 test/swank/test_swank/commands/contrib/swank_hyperdoc.clj
View
15 test/swank/test_swank/commands/contrib/swank_hyperdoc.clj
@@ -0,0 +1,15 @@
+(ns swank.test-swank.commands.contrib.swank-hyperdoc
+ (:use swank.commands.contrib.swank-hyperdoc :reload-all)
+ (:use clojure.test))
+
+(defn emacs-package-fixture [f]
+ (binding [swank.core/*current-package* "user"]
+ (f)))
+
+(use-fixtures :each emacs-package-fixture)
+
+(deftest hyperdoc-test
+ (testing "hyperdoc for symbol"
+ (is (= '((clojure.core . "http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/list")) (hyperdoc-lookup "list"))))
+ (testing "hyperdoc for invalid symbol"
+ (is (nil? (hyperdoc-lookup "list1234")))))
Please sign in to comment.
Something went wrong with that request. Please try again.