Mercurial > lasercutter
comparison src/clojure/contrib/test_contrib/test_repl_utils.clj @ 10:ef7dbbd6452c
added clojure source goodness
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 21 Aug 2010 06:25:44 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
9:35cf337adfcf | 10:ef7dbbd6452c |
---|---|
1 (ns clojure.contrib.test-repl-utils | |
2 (:use clojure.test | |
3 clojure.contrib.repl-utils)) | |
4 | |
5 (deftest test-apropos | |
6 (testing "with a regular expression" | |
7 (is (= '[defmacro] (apropos #"^defmacro$"))) | |
8 (is (some '#{defmacro} (apropos #"def.acr."))) | |
9 (is (= [] (apropos #"nothing-has-this-name")))) | |
10 | |
11 | |
12 (testing "with a string" | |
13 (is (some '#{defmacro} (apropos "defmacro"))) | |
14 (is (some '#{defmacro} (apropos "efmac"))) | |
15 (is (= [] (apropos "nothing-has-this-name")))) | |
16 | |
17 (testing "with a symbol" | |
18 (is (some '#{defmacro} (apropos 'defmacro))) | |
19 (is (some '#{defmacro} (apropos 'efmac))) | |
20 (is (= [] (apropos 'nothing-has-this-name))))) |