summaryrefslogtreecommitdiff
path: root/test/clojure/test_clojure
diff options
context:
space:
mode:
Diffstat (limited to 'test/clojure/test_clojure')
-rw-r--r--test/clojure/test_clojure/java/io.clj8
-rw-r--r--test/clojure/test_clojure/java/javadoc.clj22
-rw-r--r--test/clojure/test_clojure/java/shell.clj16
-rw-r--r--test/clojure/test_clojure/metadata.clj5
4 files changed, 46 insertions, 5 deletions
diff --git a/test/clojure/test_clojure/java/io.clj b/test/clojure/test_clojure/java/io.clj
index d193942d..2b831b72 100644
--- a/test/clojure/test_clojure/java/io.clj
+++ b/test/clojure/test_clojure/java/io.clj
@@ -1,3 +1,11 @@
+; Copyright (c) Rich Hickey. 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 clojure.test-clojure.java.io
(:use clojure.test clojure.java.io)
(:import (java.io File FileInputStream BufferedInputStream
diff --git a/test/clojure/test_clojure/java/javadoc.clj b/test/clojure/test_clojure/java/javadoc.clj
new file mode 100644
index 00000000..575314cf
--- /dev/null
+++ b/test/clojure/test_clojure/java/javadoc.clj
@@ -0,0 +1,22 @@
+; Copyright (c) Rich Hickey. 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 clojure.test-clojure.java.javadoc
+ (:use clojure.test
+ [clojure.java.javadoc :as j])
+ (:import (java.io File)))
+
+(deftest javadoc-url-test
+ (testing "for a core api"
+ (binding [*feeling-lucky* false]
+ (are [x y] (= x (#'j/javadoc-url y))
+ nil "foo.Bar"
+ (str *core-java-api* "java/lang/String.html") "java.lang.String")))
+ (testing "for a remote javadoc"
+ (binding [*remote-javadocs* (ref (sorted-map "java." "http://example.com/"))]
+ (is (= "http://example.com/java/lang/Number.html" (#'j/javadoc-url "java.lang.Number"))))))
diff --git a/test/clojure/test_clojure/java/shell.clj b/test/clojure/test_clojure/java/shell.clj
index a8c6f0a0..777698e2 100644
--- a/test/clojure/test_clojure/java/shell.clj
+++ b/test/clojure/test_clojure/java/shell.clj
@@ -1,3 +1,11 @@
+; Copyright (c) Rich Hickey. 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 clojure.test-clojure.java.shell
(:use clojure.test
[clojure.java.shell :as sh])
@@ -5,10 +13,10 @@
(deftest test-parse-args
(are [x y] (= x y)
- {:cmd [nil] :out "UTF-8" :dir nil :env nil} (#'sh/parse-args [])
- {:cmd ["ls"] :out "UTF-8" :dir nil :env nil} (#'sh/parse-args ["ls"])
- {:cmd ["ls" "-l"] :out "UTF-8" :dir nil :env nil} (#'sh/parse-args ["ls" "-l"])
- {:cmd ["ls"] :out "ISO-8859-1" :dir nil :env nil} (#'sh/parse-args ["ls" :out "ISO-8859-1"])))
+ [[] {:out "UTF-8" :dir nil :env nil}] (#'sh/parse-args [])
+ [["ls"] {:out "UTF-8" :dir nil :env nil}] (#'sh/parse-args ["ls"])
+ [["ls" "-l"] {:out "UTF-8" :dir nil :env nil}] (#'sh/parse-args ["ls" "-l"])
+ [["ls"] {:out "ISO-8859-1" :dir nil :env nil}] (#'sh/parse-args ["ls" :out "ISO-8859-1"])))
(deftest test-with-sh-dir
(are [x y] (= x y)
diff --git a/test/clojure/test_clojure/metadata.clj b/test/clojure/test_clojure/metadata.clj
index 53919e9d..ce93912a 100644
--- a/test/clojure/test_clojure/metadata.clj
+++ b/test/clojure/test_clojure/metadata.clj
@@ -21,7 +21,10 @@
clojure.walk
clojure.xml
clojure.zip
- clojure.java.io])
+ clojure.java.io
+ clojure.java.browse
+ clojure.java.javadoc
+ clojure.java.shell])
(doseq [ns public-namespaces]
(require ns))