summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lisp/image/wallpaper-tests.el12
-rw-r--r--test/lisp/progmodes/ruby-mode-tests.el16
2 files changed, 24 insertions, 4 deletions
diff --git a/test/lisp/image/wallpaper-tests.el b/test/lisp/image/wallpaper-tests.el
index 2e4e36030d4..c4167adbef2 100644
--- a/test/lisp/image/wallpaper-tests.el
+++ b/test/lisp/image/wallpaper-tests.el
@@ -129,12 +129,16 @@
(should (equal called fil-jpg)))))
(ert-deftest wallpaper--find-command/return-string ()
- (should (or (not (wallpaper--find-command))
- (stringp (wallpaper--find-command)))))
+ (let ((cmd (wallpaper--find-command)))
+ (should (or (not cmd)
+ (stringp cmd)))))
(ert-deftest wallpaper--find-command-args/return-list ()
- (should (or (not (wallpaper--find-command-args))
- (listp (wallpaper--find-command-args)))))
+ (let ((cmdargs (wallpaper--find-command-args)))
+ (if (functionp cmdargs)
+ (setq cmdargs (funcall cmdargs)))
+ (should (or (not cmdargs)
+ (listp cmdargs)))))
(ert-deftest wallpaper--image-file-regexp/return-string ()
(should (stringp (wallpaper--image-file-regexp))))
diff --git a/test/lisp/progmodes/ruby-mode-tests.el b/test/lisp/progmodes/ruby-mode-tests.el
index 8a75c83d2c3..117385ea3e8 100644
--- a/test/lisp/progmodes/ruby-mode-tests.el
+++ b/test/lisp/progmodes/ruby-mode-tests.el
@@ -567,6 +567,22 @@ VALUES-PLIST is a list with alternating index and value elements."
(search-backward "_")
(should (string= (ruby-add-log-current-method) "C::D#foo"))))
+(ert-deftest ruby-add-log-current-method-singleton-referencing-outer ()
+ (ruby-with-temp-buffer (ruby-test-string
+ "module M
+ | module N
+ | module C
+ | class D
+ | def C.foo
+ | _
+ | end
+ | end
+ | end
+ | end
+ |end")
+ (search-backward "_")
+ (should (string= (ruby-add-log-current-method) "M::N::C.foo"))))
+
(ert-deftest ruby-add-log-current-method-after-inner-class ()
(ruby-with-temp-buffer (ruby-test-string
"module M