Permalink
Browse files

fix CONTRIB-105: logging tests no longer use hardcoded line separators

  • Loading branch information...
1 parent 7c40083 commit 1a88c88daa87cd61aa7c1c08d538487b55efd97d Alexander Taggart committed Feb 28, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 modules/logging/src/test/clojure/clojure/contrib/test_logging.clj
View
4 modules/logging/src/test/clojure/clojure/contrib/test_logging.clj
@@ -220,15 +220,15 @@
(is (= ["clojure.contrib.test-logging"
:debug
nil
- "(+ 4 5)\n=> 9"]
+ (format "(+ 4 5)%n=> 9")]
@seh
seh added a line comment May 18, 2011

Unfortunately, now I see this failing for there being an extra carriage return after the "9":

FAIL in (spy-default) (test_logging.clj:220)
expected: (= ["clojure.contrib.test-logging" :debug nil (format "(+ 4 5)%n=> 9")]
             (peek (clojure.core/deref *entries*)))
actual: (not (= ["clojure.contrib.test-logging" :debug nil "(+ 4 5)\r\n=> 9"]
                ["clojure.contrib.test-logging" :debug nil "(+ 4 5)\r\n=> 9\r"]))

The same problem arises for the test at line 231.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
(peek @*entries*))))
(deftest spy-level
(log/spy :fatal (+ 4 5))
(is (= ["clojure.contrib.test-logging"
:fatal
nil
- "(+ 4 5)\n=> 9"]
+ (format "(+ 4 5)%n=> 9")]
@seh
seh added a line comment May 18, 2011

This test now fails in the same way as line 223, due to a trailing carriage return character.

@ataggart
Clojure member
ataggart added a line comment May 18, 2011
@seh
seh added a line comment May 18, 2011

Thanks for the fast response. The fix looks sound, and the tests now pass for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
(peek @*entries*))))
(comment

0 comments on commit 1a88c88

Please sign in to comment.