Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update to 0.1.1, and make sure it works in both 1.2 and 1.3

  • Loading branch information...
commit 4aecbf3e367c51b623baf05a020f6d505e8a2946 1 parent 2d2d7f0
@ztellman authored
View
5 project.clj
@@ -1,3 +1,4 @@
-(defproject potemkin "0.1.1-SNAPSHOT"
+(defproject potemkin "0.1.1"
:description "Some useful facades."
- :dependencies [[org.clojure/clojure "1.3.0"]])
+ :dependencies [[org.clojure/clojure "1.3.0"]]
+ :multi-deps {"1.2" [[org.clojure/clojure "1.2.1"]]})
View
22 test/potemkin/test/imports.clj
@@ -0,0 +1,22 @@
+;; Copyright (c) Zachary Tellman. All rights reserved.
+;; The use and distribution terms for this software are covered by the
+;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
+;; which can be found in the file epl-v10.html at the root of this distribution.
+;; By using this software in any fashion, you are agreeing to be bound by
+;; the terms of this license.
+;; You must not remove this notice, or any other, from this software.
+
+(ns potemkin.test.imports)
+
+(defn multi-arity-fn
+ "Here is a doc-string."
+ ([x])
+ ([x y]))
+
+(defprotocol TestProtocol
+ (protocol-function [x a b c] "This is a protocol function."))
+
+(defmacro multi-arity-macro
+ "I am described."
+ ([a])
+ ([a b]))
View
25 test/potemkin/test/namespace.clj
@@ -9,17 +9,16 @@
(ns potemkin.test.namespace
(:use
potemkin
- clojure.test)
+ clojure.test
+ clojure.repl)
(:require
[clojure.repl :as repl]
[clojure.string :as str]
- [potemkin.test.protocol :as p]))
+ [potemkin.test.imports :as i]))
-(import-macro repl/source)
-(import-macro repl/doc)
-(import-fn repl/find-doc)
-(import-fn p/multi-arity)
-(import-fn p/protocol-function)
+(import-macro i/multi-arity-macro)
+(import-fn i/multi-arity-fn)
+(import-fn i/protocol-function)
(defn drop-lines [n s]
(->> s str/split-lines (drop n) (interpose "\n") (apply str)))
@@ -31,14 +30,12 @@
`(= ~@(map (fn [x] `(drop-lines 2 (with-out-str ~x))) args)))
(deftest test-import-macro
- (is (out= (source repl/source) (source source)))
- (is (rest-out= (doc repl/doc) (doc doc))))
+ (is (out= (source i/multi-arity-macro) (source multi-arity-macro)))
+ (is (rest-out= (doc i/multi-arity-macro) (doc multi-arity-macro))))
(deftest test-import-fn
- (is (out= (source repl/find-doc) (source find-doc)))
- (is (rest-out= (doc repl/find-doc) (doc find-doc)))
- (is (out= (source p/multi-arity) (source multi-arity)))
- (is (rest-out= (doc p/multi-arity) (doc multi-arity)))
- (is (rest-out= (doc p/protocol-function) (doc protocol-function))))
+ (is (out= (source i/multi-arity-fn) (source multi-arity-fn)))
+ (is (rest-out= (doc i/multi-arity-fn) (doc multi-arity-fn)))
+ (is (rest-out= (doc i/protocol-function) (doc protocol-function))))
View
9 test/potemkin/test/protocol.clj
@@ -1,9 +0,0 @@
-(ns potemkin.test.protocol)
-
-(defn multi-arity
- "Here is a doc-string."
- ([x])
- ([x y]))
-
-(defprotocol TestProtocol
- (protocol-function [x a b c] "This is a protocol function."))
Please sign in to comment.
Something went wrong with that request. Please try again.