diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-11-19 12:24:12 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-11-19 12:24:12 -0500 |
commit | 19dc72069c79865d5464737b4ce10ed25a3be49b (patch) | |
tree | 58eb37bf96ecbb9659eba0b95f6fa42ea4551a5d /test/automated/ert-x-tests.el | |
parent | 855b17af8fd8a96e1ca66a652b88f34479df12d7 (diff) | |
download | emacs-19dc72069c79865d5464737b4ce10ed25a3be49b.tar.gz |
Use cl-lib instead of cl, and interactive-p => called-interactively-p.
* lisp/erc/erc-track.el, lisp/erc/erc-networks.el, lisp/erc/erc-netsplit.el:
* lisp/erc/erc-dcc.el, lisp/erc/erc-backend.el: Use cl-lib, nth, pcase, and
called-interactively-p instead of cl.
* lisp/erc/erc-speedbar.el, lisp/erc/erc-services.el:
* lisp/erc/erc-pcomplete.el, lisp/erc/erc-notify.el, lisp/erc/erc-match.el:
* lisp/erc/erc-log.el, lisp/erc/erc-join.el, lisp/erc/erc-ezbounce.el:
* lisp/erc/erc-capab.el: Don't require cl since we don't use it.
* lisp/erc/erc.el: Use cl-lib, nth, pcase, and called-interactively-p i.s.o cl.
(erc-lurker-ignore-chars, erc-common-server-suffixes): Move before first use.
* lisp/json.el: Don't require cl since we don't use it.
* lisp/color.el: Don't require cl.
(color-complement): `caddr' -> `nth 2'.
* test/automated/ert-x-tests.el: Use cl-lib.
* test/automated/ert-tests.el: Use lexical-binding and cl-lib.
Diffstat (limited to 'test/automated/ert-x-tests.el')
-rw-r--r-- | test/automated/ert-x-tests.el | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/test/automated/ert-x-tests.el b/test/automated/ert-x-tests.el index 520502bb307..e03c8475442 100644 --- a/test/automated/ert-x-tests.el +++ b/test/automated/ert-x-tests.el @@ -28,7 +28,7 @@ ;;; Code: (eval-when-compile - (require 'cl)) + (require 'cl-lib)) (require 'ert) (require 'ert-x) @@ -233,8 +233,8 @@ desired effect." (should (equal (buffer-string) "")) (let ((message-log-max 2)) (let ((message-log-max t)) - (loop for i below 4 do - (message "%s" i)) + (cl-loop for i below 4 do + (message "%s" i)) (should (equal (buffer-string) "0\n1\n2\n3\n"))) (should (equal (buffer-string) "0\n1\n2\n3\n")) (message "") @@ -244,28 +244,28 @@ desired effect." (ert-deftest ert-test-force-message-log-buffer-truncation () :tags '(:causes-redisplay) - (labels ((body () - (loop for i below 3 do - (message "%s" i))) - ;; Uses the implicit messages buffer truncation implemented - ;; in Emacs' C core. - (c (x) - (ert-with-buffer-renamed ("*Messages*") - (let ((message-log-max x)) - (body)) - (with-current-buffer "*Messages*" - (buffer-string)))) - ;; Uses our lisp reimplementation. - (lisp (x) - (ert-with-buffer-renamed ("*Messages*") - (let ((message-log-max t)) - (body)) - (let ((message-log-max x)) - (ert--force-message-log-buffer-truncation)) - (with-current-buffer "*Messages*" - (buffer-string))))) - (loop for x in '(0 1 2 3 4 t) do - (should (equal (c x) (lisp x)))))) + (cl-labels ((body () + (cl-loop for i below 3 do + (message "%s" i))) + ;; Uses the implicit messages buffer truncation implemented + ;; in Emacs' C core. + (c (x) + (ert-with-buffer-renamed ("*Messages*") + (let ((message-log-max x)) + (body)) + (with-current-buffer "*Messages*" + (buffer-string)))) + ;; Uses our lisp reimplementation. + (lisp (x) + (ert-with-buffer-renamed ("*Messages*") + (let ((message-log-max t)) + (body)) + (let ((message-log-max x)) + (ert--force-message-log-buffer-truncation)) + (with-current-buffer "*Messages*" + (buffer-string))))) + (cl-loop for x in '(0 1 2 3 4 t) do + (should (equal (c x) (lisp x)))))) (provide 'ert-x-tests) |