Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (16 sloc) 0.654 kb
(ns clojure.contrib.test-repl-utils
(:use clojure.test
clojure.contrib.repl-utils))
(deftest test-apropos
(testing "with a regular expression"
(is (= '[defmacro] (apropos #"^defmacro$")))
(is (some '#{defmacro} (apropos #"def.acr.")))
(is (= [] (apropos #"nothing-has-this-name"))))
(testing "with a string"
(is (some '#{defmacro} (apropos "defmacro")))
(is (some '#{defmacro} (apropos "efmac")))
(is (= [] (apropos "nothing-has-this-name"))))
(testing "with a symbol"
(is (some '#{defmacro} (apropos 'defmacro)))
(is (some '#{defmacro} (apropos 'efmac)))
(is (= [] (apropos 'nothing-has-this-name)))))
Jump to Line
Something went wrong with that request. Please try again.