summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r--test/lisp/emacs-lisp/eieio-tests/eieio-tests.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
index 09ee123efaa..0c7b6b71c31 100644
--- a/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
+++ b/test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
@@ -862,8 +862,7 @@ Subclasses to override slot attributes.")
(should (oref obj1 a-slot))))
(defclass NAMED (eieio-named)
- ((some-slot :initform nil)
- )
+ ((some-slot :initform nil))
"A class inheriting from eieio-named.")
(ert-deftest eieio-test-35-named-object ()
@@ -902,6 +901,18 @@ Subclasses to override slot attributes.")
(should
(fboundp 'eieio--defalias)))
+(ert-deftest eieio-test-38-clone-named-object ()
+ (let* ((A (NAMED :object-name "aa"))
+ (B (clone A :object-name "bb"))
+ (C (clone A "cc"))
+ (D (clone A))
+ (E (clone D)))
+ (should (string= "aa" (oref A object-name)))
+ (should (string= "bb" (oref B object-name)))
+ (should (string= "cc" (oref C object-name)))
+ (should (string= "aa-1" (oref D object-name)))
+ (should (string= "aa-2" (oref E object-name)))))
+
(provide 'eieio-tests)