]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix for bad test in ruby-mode-tests.el.
authorChong Yidong <cyd@gnu.org>
Sun, 2 Dec 2012 06:06:32 +0000 (14:06 +0800)
committerChong Yidong <cyd@gnu.org>
Sun, 2 Dec 2012 06:06:32 +0000 (14:06 +0800)
* automated/ruby-mode-tests.el (ruby-add-log-current-method-examples):
Don't use loop macro, to allow automated testing to work.

test/ChangeLog
test/automated/ruby-mode-tests.el

index b66c2925287d55bcf98955976f9826318aaf9f29..21f0f29b73b3354a228d0fed4a2d75ae76d9ce79 100644 (file)
@@ -1,3 +1,9 @@
+2012-12-02  Chong Yidong  <cyd@gnu.org>
+
+       * automated/ruby-mode-tests.el
+       (ruby-add-log-current-method-examples): Don't use loop macro, to
+       allow automated testing to work.
+
 2012-11-20  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * automated/advice-tests.el (advice-tests--data): Remove.
index ad48413b030cc05d5beb4e83cd3b5ccc98b2183a..620fe72fb690c9db207dcf3a9807b99d34d7edbd 100644 (file)
@@ -296,21 +296,23 @@ VALUES-PLIST is a list with alternating index and value elements."
   (let ((pairs '(("foo" . "#foo")
                  ("C.foo" . ".foo")
                  ("self.foo" . ".foo"))))
-    (loop for (name . value) in pairs
-          do (with-temp-buffer
-               (insert (ruby-test-string
-                        "module M
+    (dolist (pair pairs)
+      (let ((name  (car pair))
+           (value (cdr pair)))
+       (with-temp-buffer
+         (insert (ruby-test-string
+                  "module M
                         |  class C
                         |    def %s
                         |    end
                         |  end
                         |end"
-                        name))
-               (ruby-mode)
-               (search-backward "def")
-               (forward-line)
-               (should (string= (ruby-add-log-current-method)
-                                (format "M::C%s" value)))))))
+                  name))
+         (ruby-mode)
+         (search-backward "def")
+         (forward-line)
+         (should (string= (ruby-add-log-current-method)
+                          (format "M::C%s" value))))))))
 
 (defvar ruby-block-test-example
   (ruby-test-string