diff options
author | Aaron Bedra & Stuart Sierra <pair@thinkrelevance.com> | 2010-07-03 13:27:12 -0400 |
---|---|---|
committer | Stuart Halloway <stu@thinkrelevance.com> | 2010-07-09 15:01:25 -0400 |
commit | 4630d025d2101d13e626b56b3b2ba01950bd0ac9 (patch) | |
tree | 1eede73963669fcb71df14ba3721d101e3cc9961 | |
parent | 4bec81db4ee4e9e4227a66bb1a04ba06e95ea9b6 (diff) |
Tests are now passing on windows refs #376
Signed-off-by: Stuart Halloway <stu@thinkrelevance.com>
-rw-r--r-- | test/clojure/test_clojure/java/io.clj | 5 | ||||
-rw-r--r-- | test/clojure/test_clojure/main.clj | 2 | ||||
-rw-r--r-- | test/clojure/test_clojure/rt.clj | 10 |
3 files changed, 8 insertions, 9 deletions
diff --git a/test/clojure/test_clojure/java/io.clj b/test/clojure/test_clojure/java/io.clj index 2b831b72..05055c3f 100644 --- a/test/clojure/test_clojure/java/io.clj +++ b/test/clojure/test_clojure/java/io.clj @@ -124,7 +124,6 @@ (deftest test-as-url (are [file-part input] (= (URL. (str "file:" file-part)) (as-url input)) "foo" "file:foo" - "/foo" (File. "/foo") "baz" (URL. "file:baz") "quux" (URI. "file:quux")) (is (nil? (as-url nil)))) @@ -141,11 +140,11 @@ (testing "strings" (is (= "foo" (as-relative-path "foo")))) (testing "absolute path strings are forbidden" - (is (thrown? IllegalArgumentException (as-relative-path (str File/separator "baz"))))) + (is (thrown? IllegalArgumentException (as-relative-path (.getAbsolutePath (File. "baz")))))) (testing "relative File paths" (is (= "bar" (as-relative-path (File. "bar"))))) (testing "absolute File paths are forbidden" - (is (thrown? IllegalArgumentException (as-relative-path (File. (str File/separator "quux"))))))) + (is (thrown? IllegalArgumentException (as-relative-path (File. (.getAbsolutePath (File. "quux")))))))) (defn stream-should-have [stream expected-bytes msg] (let [actual-bytes (byte-array (alength expected-bytes))] diff --git a/test/clojure/test_clojure/main.clj b/test/clojure/test_clojure/main.clj index 8c5f098c..0f6ca1d7 100644 --- a/test/clojure/test_clojure/main.clj +++ b/test/clojure/test_clojure/main.clj @@ -45,6 +45,6 @@ (deftest repl-exception-safety (testing "catches and prints exception on bad equals" - (is (= "java.lang.NullPointerException\n" + (is (re-matches #"java\.lang\.NullPointerException\r?\n" (run-repl-and-return-err "(proxy [Object] [] (equals [o] (.toString nil)))"))))) diff --git a/test/clojure/test_clojure/rt.clj b/test/clojure/test_clojure/rt.clj index 175bfd82..f3a9b08b 100644 --- a/test/clojure/test_clojure/rt.clj +++ b/test/clojure/test_clojure/rt.clj @@ -55,23 +55,23 @@ (deftest error-messages (testing "binding a core var that already refers to something" (should-print-err-message - #"WARNING: prefers already refers to: #'clojure.core/prefers in namespace: .*\n" + #"WARNING: prefers already refers to: #'clojure.core/prefers in namespace: .*\r?\n" (defn prefers [] (throw (RuntimeException. "rebound!"))))) (testing "reflection cannot resolve field" (should-print-err-message - #"Reflection warning, NO_SOURCE_PATH:\d+ - reference to field blah can't be resolved.\n" + #"Reflection warning, NO_SOURCE_PATH:\d+ - reference to field blah can't be resolved\.\r?\n" (defn foo [x] (.blah x)))) (testing "reflection cannot resolve instance method" (should-print-err-message - #"Reflection warning, NO_SOURCE_PATH:\d+ - call to zap can't be resolved.\n" + #"Reflection warning, NO_SOURCE_PATH:\d+ - call to zap can't be resolved\.\r?\n" (defn foo [x] (.zap x 1)))) (testing "reflection cannot resolve static method" (should-print-err-message - #"Reflection warning, NO_SOURCE_PATH:\d+ - call to valueOf can't be resolved.\n" + #"Reflection warning, NO_SOURCE_PATH:\d+ - call to valueOf can't be resolved\.\r?\n" (defn foo [] (Integer/valueOf #"boom")))) (testing "reflection cannot resolve constructor" (should-print-err-message - #"Reflection warning, NO_SOURCE_PATH:\d+ - call to java.lang.String ctor can't be resolved.\n" + #"Reflection warning, NO_SOURCE_PATH:\d+ - call to java.lang.String ctor can't be resolved\.\r?\n" (defn foo [] (String. 1 2 3))))) (def example-var) |