emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113374: Quieten ruby-mode-tests.el compilation


From: Glenn Morris
Subject: [Emacs-diffs] trunk r113374: Quieten ruby-mode-tests.el compilation
Date: Thu, 11 Jul 2013 16:05:07 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113374
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2013-07-11 09:04:56 -0700
message:
  Quieten ruby-mode-tests.el compilation
  
  * test/automated/ruby-mode-tests.el (ruby-deftest-move-to-block):
  Goto point-min.
  (works-on-do, zero-is-noop, ok-with-three, ok-with-minus-two)
  (ruby-move-to-block-skips-percent-literal)
  (ruby-move-to-block-skips-heredoc)
  (ruby-move-to-block-moves-from-else-to-if)
  (ruby-beginning-of-defun-does-not-fold-case)
  (ruby-end-of-defun-skips-to-next-line-after-the-method):
  Replace goto-line with forward-line/goto-char.
  (ruby-move-to-block-does-not-fold-case): Remove unneeded end-of-buffer.
modified:
  test/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-8588
  test/automated/ruby-mode-tests.el 
rubymodetests.el-20120720101201-mn39s4kfopdxj3ek-1
=== modified file 'test/ChangeLog'
--- a/test/ChangeLog    2013-07-11 16:01:26 +0000
+++ b/test/ChangeLog    2013-07-11 16:04:56 +0000
@@ -1,5 +1,16 @@
 2013-07-11  Glenn Morris  <address@hidden>
 
+       * automated/ruby-mode-tests.el (ruby-deftest-move-to-block):
+       Goto point-min.
+       (works-on-do, zero-is-noop, ok-with-three, ok-with-minus-two)
+       (ruby-move-to-block-skips-percent-literal)
+       (ruby-move-to-block-skips-heredoc)
+       (ruby-move-to-block-moves-from-else-to-if)
+       (ruby-beginning-of-defun-does-not-fold-case)
+       (ruby-end-of-defun-skips-to-next-line-after-the-method):
+       Replace goto-line with forward-line/goto-char.
+       (ruby-move-to-block-does-not-fold-case): Remove unneeded end-of-buffer.
+
        * automated/package-test.el (makeinfo-buffer): Autoload.
        (compilation-in-progress, tar-parse-info, tar-header-name): Declare.
        (package-test-install-texinfo): Don't require makeinfo.

=== modified file 'test/automated/ruby-mode-tests.el'
--- a/test/automated/ruby-mode-tests.el 2013-07-09 07:11:50 +0000
+++ b/test/automated/ruby-mode-tests.el 2013-07-11 16:04:56 +0000
@@ -475,29 +475,30 @@
      (with-temp-buffer
        (insert ruby-block-test-example)
        (ruby-mode)
+       (goto-char (point-min))
        ,@body)))
 
 (put 'ruby-deftest-move-to-block 'lisp-indent-function 'defun)
 
 (ruby-deftest-move-to-block works-on-do
-  (goto-line 11)
+  (forward-line 10)
   (ruby-end-of-block)
   (should (= 13 (line-number-at-pos)))
   (ruby-beginning-of-block)
   (should (= 11 (line-number-at-pos))))
 
 (ruby-deftest-move-to-block zero-is-noop
-  (goto-line 5)
+  (forward-line 4)
   (ruby-move-to-block 0)
   (should (= 5 (line-number-at-pos))))
 
 (ruby-deftest-move-to-block ok-with-three
-  (goto-line 2)
+  (forward-line 1)
   (ruby-move-to-block 3)
   (should (= 14 (line-number-at-pos))))
 
 (ruby-deftest-move-to-block ok-with-minus-two
-  (goto-line 10)
+  (forward-line 9)
   (ruby-move-to-block -2)
   (should (= 2 (line-number-at-pos))))
 
@@ -515,7 +516,7 @@
                     |  |
                     |end")))
     (ruby-with-temp-buffer s
-      (goto-line 1)
+      (goto-char (point-min))
       (ruby-end-of-block)
       (should (= 5 (line-number-at-pos)))
       (ruby-beginning-of-block)
@@ -530,7 +531,7 @@
        |  end
        |  eowarn
        |end")
-    (goto-line 1)
+    (goto-char (point-min))
     (ruby-end-of-block)
     (should (= 6 (line-number-at-pos)))
     (ruby-beginning-of-block)
@@ -542,7 +543,6 @@
        "foo do
        |  Module.to_s
        |end")
-    (end-of-buffer)
     (let ((case-fold-search t))
       (ruby-beginning-of-block))
     (should (= 1 (line-number-at-pos)))))
@@ -554,7 +554,8 @@
                           |  end
                           |else
                           |end")
-    (goto-line 4)
+    (goto-char (point-min))
+    (forward-line 3)
     (ruby-beginning-of-block)
     (should (= 1 (line-number-at-pos)))))
 
@@ -566,7 +567,8 @@
        |    Class.to_s
        |  end
        |end")
-    (goto-line 4)
+    (goto-char (point-min))
+    (forward-line 3)
     (let ((case-fold-search t))
       (beginning-of-defun))
     (should (= 2 (line-number-at-pos)))))
@@ -579,7 +581,8 @@
        |    'ho hum'
        |  end
        |end")
-    (goto-line 2)
+    (goto-char (point-min))
+    (forward-line 1)
     (end-of-defun)
     (should (= 5 (line-number-at-pos)))))
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]