aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-07-11 09:04:56 -0700
committerGlenn Morris2013-07-11 09:04:56 -0700
commitd2e1542aa91472925f13880b35d23ec5b5bbf9dd (patch)
tree3dcc774649bf7f21bf5471df9a8620079b924648
parent03d019811522c5d98b3359e48b5cf4d5cc9b72e5 (diff)
downloademacs-d2e1542aa91472925f13880b35d23ec5b5bbf9dd.tar.gz
emacs-d2e1542aa91472925f13880b35d23ec5b5bbf9dd.zip
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.
-rw-r--r--test/ChangeLog11
-rw-r--r--test/automated/ruby-mode-tests.el23
2 files changed, 24 insertions, 10 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 5d51a8b7e98..29aa736e8ab 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,5 +1,16 @@
12013-07-11 Glenn Morris <rgm@gnu.org> 12013-07-11 Glenn Morris <rgm@gnu.org>
2 2
3 * automated/ruby-mode-tests.el (ruby-deftest-move-to-block):
4 Goto point-min.
5 (works-on-do, zero-is-noop, ok-with-three, ok-with-minus-two)
6 (ruby-move-to-block-skips-percent-literal)
7 (ruby-move-to-block-skips-heredoc)
8 (ruby-move-to-block-moves-from-else-to-if)
9 (ruby-beginning-of-defun-does-not-fold-case)
10 (ruby-end-of-defun-skips-to-next-line-after-the-method):
11 Replace goto-line with forward-line/goto-char.
12 (ruby-move-to-block-does-not-fold-case): Remove unneeded end-of-buffer.
13
3 * automated/package-test.el (makeinfo-buffer): Autoload. 14 * automated/package-test.el (makeinfo-buffer): Autoload.
4 (compilation-in-progress, tar-parse-info, tar-header-name): Declare. 15 (compilation-in-progress, tar-parse-info, tar-header-name): Declare.
5 (package-test-install-texinfo): Don't require makeinfo. 16 (package-test-install-texinfo): Don't require makeinfo.
diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el
index 3295684dd12..ad805f16777 100644
--- a/test/automated/ruby-mode-tests.el
+++ b/test/automated/ruby-mode-tests.el
@@ -475,29 +475,30 @@ VALUES-PLIST is a list with alternating index and value elements."
475 (with-temp-buffer 475 (with-temp-buffer
476 (insert ruby-block-test-example) 476 (insert ruby-block-test-example)
477 (ruby-mode) 477 (ruby-mode)
478 (goto-char (point-min))
478 ,@body))) 479 ,@body)))
479 480
480(put 'ruby-deftest-move-to-block 'lisp-indent-function 'defun) 481(put 'ruby-deftest-move-to-block 'lisp-indent-function 'defun)
481 482
482(ruby-deftest-move-to-block works-on-do 483(ruby-deftest-move-to-block works-on-do
483 (goto-line 11) 484 (forward-line 10)
484 (ruby-end-of-block) 485 (ruby-end-of-block)
485 (should (= 13 (line-number-at-pos))) 486 (should (= 13 (line-number-at-pos)))
486 (ruby-beginning-of-block) 487 (ruby-beginning-of-block)
487 (should (= 11 (line-number-at-pos)))) 488 (should (= 11 (line-number-at-pos))))
488 489
489(ruby-deftest-move-to-block zero-is-noop 490(ruby-deftest-move-to-block zero-is-noop
490 (goto-line 5) 491 (forward-line 4)
491 (ruby-move-to-block 0) 492 (ruby-move-to-block 0)
492 (should (= 5 (line-number-at-pos)))) 493 (should (= 5 (line-number-at-pos))))
493 494
494(ruby-deftest-move-to-block ok-with-three 495(ruby-deftest-move-to-block ok-with-three
495 (goto-line 2) 496 (forward-line 1)
496 (ruby-move-to-block 3) 497 (ruby-move-to-block 3)
497 (should (= 14 (line-number-at-pos)))) 498 (should (= 14 (line-number-at-pos))))
498 499
499(ruby-deftest-move-to-block ok-with-minus-two 500(ruby-deftest-move-to-block ok-with-minus-two
500 (goto-line 10) 501 (forward-line 9)
501 (ruby-move-to-block -2) 502 (ruby-move-to-block -2)
502 (should (= 2 (line-number-at-pos)))) 503 (should (= 2 (line-number-at-pos))))
503 504
@@ -515,7 +516,7 @@ VALUES-PLIST is a list with alternating index and value elements."
515 | | 516 | |
516 |end"))) 517 |end")))
517 (ruby-with-temp-buffer s 518 (ruby-with-temp-buffer s
518 (goto-line 1) 519 (goto-char (point-min))
519 (ruby-end-of-block) 520 (ruby-end-of-block)
520 (should (= 5 (line-number-at-pos))) 521 (should (= 5 (line-number-at-pos)))
521 (ruby-beginning-of-block) 522 (ruby-beginning-of-block)
@@ -530,7 +531,7 @@ VALUES-PLIST is a list with alternating index and value elements."
530 | end 531 | end
531 | eowarn 532 | eowarn
532 |end") 533 |end")
533 (goto-line 1) 534 (goto-char (point-min))
534 (ruby-end-of-block) 535 (ruby-end-of-block)
535 (should (= 6 (line-number-at-pos))) 536 (should (= 6 (line-number-at-pos)))
536 (ruby-beginning-of-block) 537 (ruby-beginning-of-block)
@@ -542,7 +543,6 @@ VALUES-PLIST is a list with alternating index and value elements."
542 "foo do 543 "foo do
543 | Module.to_s 544 | Module.to_s
544 |end") 545 |end")
545 (end-of-buffer)
546 (let ((case-fold-search t)) 546 (let ((case-fold-search t))
547 (ruby-beginning-of-block)) 547 (ruby-beginning-of-block))
548 (should (= 1 (line-number-at-pos))))) 548 (should (= 1 (line-number-at-pos)))))
@@ -554,7 +554,8 @@ VALUES-PLIST is a list with alternating index and value elements."
554 | end 554 | end
555 |else 555 |else
556 |end") 556 |end")
557 (goto-line 4) 557 (goto-char (point-min))
558 (forward-line 3)
558 (ruby-beginning-of-block) 559 (ruby-beginning-of-block)
559 (should (= 1 (line-number-at-pos))))) 560 (should (= 1 (line-number-at-pos)))))
560 561
@@ -566,7 +567,8 @@ VALUES-PLIST is a list with alternating index and value elements."
566 | Class.to_s 567 | Class.to_s
567 | end 568 | end
568 |end") 569 |end")
569 (goto-line 4) 570 (goto-char (point-min))
571 (forward-line 3)
570 (let ((case-fold-search t)) 572 (let ((case-fold-search t))
571 (beginning-of-defun)) 573 (beginning-of-defun))
572 (should (= 2 (line-number-at-pos))))) 574 (should (= 2 (line-number-at-pos)))))
@@ -579,7 +581,8 @@ VALUES-PLIST is a list with alternating index and value elements."
579 | 'ho hum' 581 | 'ho hum'
580 | end 582 | end
581 |end") 583 |end")
582 (goto-line 2) 584 (goto-char (point-min))
585 (forward-line 1)
583 (end-of-defun) 586 (end-of-defun)
584 (should (= 5 (line-number-at-pos))))) 587 (should (= 5 (line-number-at-pos)))))
585 588