summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/clj/clojure/test.clj6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/clj/clojure/test.clj b/src/clj/clojure/test.clj
index 3d09f23e..960e580b 100644
--- a/src/clj/clojure/test.clj
+++ b/src/clj/clojure/test.clj
@@ -468,7 +468,7 @@
;; (is (thrown-with-msg? c re expr))
;; Asserts that evaluating expr throws an exception of class c.
;; Also asserts that the message string of the exception matches
- ;; (with re-matches) the regular expression re.
+ ;; (with re-find) the regular expression re.
(let [klass (nth form 1)
re (nth form 2)
body (nthnext form 3)]
@@ -476,7 +476,7 @@
(report {:type :fail, :message ~msg, :expected '~form, :actual nil})
(catch ~klass e#
(let [m# (.getMessage e#)]
- (if (re-matches ~re m#)
+ (if (re-find ~re m#)
(report {:type :pass, :message ~msg,
:expected '~form, :actual e#})
(report {:type :fail, :message ~msg,
@@ -512,7 +512,7 @@
(is (thrown-with-msg? c re body)) checks that an instance of c is
thrown AND that the message on the exception matches (with
- re-matches) the regular expression re."
+ re-find) the regular expression re."
([form] `(is ~form nil))
([form msg] `(try-expr ~msg ~form)))