diff options
author | Stefan Kangas <stefan@marxist.se> | 2021-12-20 13:57:19 +0100 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2021-12-20 16:05:42 +0100 |
commit | 2bfea5fd1fd1335d4b865e5561f8a40596064eae (patch) | |
tree | ade5dfa798dbe65979a7384354de532262b3ba9d /test/lisp/emacs-lisp | |
parent | 3cf11a3c6101cc30e3a8d40fdab6cdcb097105c8 (diff) | |
download | emacs-2bfea5fd1fd1335d4b865e5561f8a40596064eae.tar.gz emacs-2bfea5fd1fd1335d4b865e5561f8a40596064eae.tar.bz2 emacs-2bfea5fd1fd1335d4b865e5561f8a40596064eae.zip |
Prefer skip-unless in one eieio test
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-01-mix-alloc-initarg): Use skip-unless to correctly mark
the test as skipped.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/eieio-tests/eieio-tests.el | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el index 25b36c0f1cc..a9e39ea8fb1 100644 --- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el +++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el @@ -139,19 +139,19 @@ (ert-deftest eieio-test-01-mix-alloc-initarg () ;; Only run this test if the message framework thingy works. - (when (and (message "foo") (string= "foo" (current-message))) - - ;; Defining this class should generate a warning(!) message that - ;; you should not mix :initarg with class allocated slots. - (defclass class-alloc-initarg () - ((throwwarning :initarg :throwwarning - :allocation :class)) - "Throw a warning mixing allocation class and an initarg.") - - ;; Check that message is there - (should (current-message)) - (should (string-match "Class allocated slots do not need :initarg" - (current-message))))) + (skip-unless (and (message "foo") (string= "foo" (current-message)))) + + ;; Defining this class should generate a warning(!) message that + ;; you should not mix :initarg with class allocated slots. + (defclass class-alloc-initarg () + ((throwwarning :initarg :throwwarning + :allocation :class)) + "Throw a warning mixing allocation class and an initarg.") + + ;; Check that message is there + (should (current-message)) + (should (string-match "Class allocated slots do not need :initarg" + (current-message)))) (defclass abstract-class () ((some-slot :initarg :some-slot |