diff options
| author | Eli Zaretskii | 2013-04-16 17:10:51 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-04-16 17:10:51 +0300 |
| commit | 83b9062422faef46592618bed64e5df47fe13670 (patch) | |
| tree | 964e529ab141daefa7b8a4f3e1788885e967f987 /test | |
| parent | 895591043f735398ad3930d12f82c0b9dfe07730 (diff) | |
| parent | a7bef505860dc15dd9fc1513e45a1ec71417471e (diff) | |
| download | emacs-83b9062422faef46592618bed64e5df47fe13670.tar.gz emacs-83b9062422faef46592618bed64e5df47fe13670.zip | |
Merge from trunk.
Diffstat (limited to 'test')
| -rw-r--r-- | test/automated/ruby-mode-tests.el | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el index 0ebe6d44e34..23dc45ad509 100644 --- a/test/automated/ruby-mode-tests.el +++ b/test/automated/ruby-mode-tests.el | |||
| @@ -487,6 +487,42 @@ VALUES-PLIST is a list with alternating index and value elements." | |||
| 487 | (ruby-beginning-of-block) | 487 | (ruby-beginning-of-block) |
| 488 | (should (= 1 (line-number-at-pos))))) | 488 | (should (= 1 (line-number-at-pos))))) |
| 489 | 489 | ||
| 490 | (ert-deftest ruby-move-to-block-does-not-fold-case () | ||
| 491 | (ruby-with-temp-buffer | ||
| 492 | (ruby-test-string | ||
| 493 | "foo do | ||
| 494 | | Module.to_s | ||
| 495 | |end") | ||
| 496 | (end-of-buffer) | ||
| 497 | (let ((case-fold-search t)) | ||
| 498 | (ruby-beginning-of-block)) | ||
| 499 | (should (= 1 (line-number-at-pos))))) | ||
| 500 | |||
| 501 | (ert-deftest ruby-beginning-of-defun-does-not-fold-case () | ||
| 502 | (ruby-with-temp-buffer | ||
| 503 | (ruby-test-string | ||
| 504 | "class C | ||
| 505 | | def bar | ||
| 506 | | Class.to_s | ||
| 507 | | end | ||
| 508 | |end") | ||
| 509 | (goto-line 4) | ||
| 510 | (let ((case-fold-search t)) | ||
| 511 | (beginning-of-defun)) | ||
| 512 | (should (= 2 (line-number-at-pos))))) | ||
| 513 | |||
| 514 | (ert-deftest ruby-end-of-defun-skips-to-next-line-after-the-method () | ||
| 515 | (ruby-with-temp-buffer | ||
| 516 | (ruby-test-string | ||
| 517 | "class D | ||
| 518 | | def tee | ||
| 519 | | 'ho hum' | ||
| 520 | | end | ||
| 521 | |end") | ||
| 522 | (goto-line 2) | ||
| 523 | (end-of-defun) | ||
| 524 | (should (= 5 (line-number-at-pos))))) | ||
| 525 | |||
| 490 | (provide 'ruby-mode-tests) | 526 | (provide 'ruby-mode-tests) |
| 491 | 527 | ||
| 492 | ;;; ruby-mode-tests.el ends here | 528 | ;;; ruby-mode-tests.el ends here |