diff options
| author | Joakim Verona | 2013-02-15 00:04:11 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-02-15 00:04:11 +0100 |
| commit | 73b3f91cfcc9b42d2851ced24d7ba3d17e4c6d00 (patch) | |
| tree | dc111557cc7492ec9cd6dbfec4db2772ee4121b9 /test | |
| parent | 694d759a9dd8fcbd23078bab33f84ff399d58971 (diff) | |
| parent | 51b3a99c948dc83f3387f440702ab6e175b61e0f (diff) | |
| download | emacs-73b3f91cfcc9b42d2851ced24d7ba3d17e4c6d00.tar.gz emacs-73b3f91cfcc9b42d2851ced24d7ba3d17e4c6d00.zip | |
auto upstream
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 9 | ||||
| -rw-r--r-- | test/automated/ruby-mode-tests.el | 25 |
2 files changed, 31 insertions, 3 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index f508209008e..7fed4f29408 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2013-02-14 Dmitry Gutov <dgutov@yandex.ru> | ||
| 2 | |||
| 3 | * automated/ruby-mode-tests.el | ||
| 4 | (ruby-move-to-block-skips-percent-literal): Add depth-affecting | ||
| 5 | bits inside the examples. | ||
| 6 | (ruby-move-to-block-skips-heredoc): New test. | ||
| 7 | (ruby-add-log-current-method-after-inner-class): Lower | ||
| 8 | expectations: move point inside a method, initially. | ||
| 9 | |||
| 1 | 2013-02-13 Dmitry Gutov <dgutov@yandex.ru> | 10 | 2013-02-13 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 11 | ||
| 3 | * automated/ruby-mode-tests.el | 12 | * automated/ruby-mode-tests.el |
diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el index 6798a49d53c..c67f92e6ed9 100644 --- a/test/automated/ruby-mode-tests.el +++ b/test/automated/ruby-mode-tests.el | |||
| @@ -390,11 +390,13 @@ VALUES-PLIST is a list with alternating index and value elements." | |||
| 390 | | class C | 390 | | class C |
| 391 | | class D | 391 | | class D |
| 392 | | end | 392 | | end |
| 393 | | _ | 393 | | def foo |
| 394 | | _ | ||
| 395 | | end | ||
| 394 | | end | 396 | | end |
| 395 | |end") | 397 | |end") |
| 396 | (search-backward "_") | 398 | (search-backward "_") |
| 397 | (should (string= (ruby-add-log-current-method) "M::C")))) | 399 | (should (string= (ruby-add-log-current-method) "M::C#foo")))) |
| 398 | 400 | ||
| 399 | (defvar ruby-block-test-example | 401 | (defvar ruby-block-test-example |
| 400 | (ruby-test-string | 402 | (ruby-test-string |
| @@ -449,20 +451,37 @@ VALUES-PLIST is a list with alternating index and value elements." | |||
| 449 | (dolist (s (list (ruby-test-string | 451 | (dolist (s (list (ruby-test-string |
| 450 | "foo do | 452 | "foo do |
| 451 | | a = %%w( | 453 | | a = %%w( |
| 454 | | def yaa | ||
| 452 | | ) | 455 | | ) |
| 453 | |end") | 456 | |end") |
| 454 | (ruby-test-string | 457 | (ruby-test-string |
| 455 | "foo do | 458 | "foo do |
| 456 | | a = %%w| | 459 | | a = %%w| |
| 460 | | end | ||
| 457 | | | | 461 | | | |
| 458 | |end"))) | 462 | |end"))) |
| 459 | (ruby-with-temp-buffer s | 463 | (ruby-with-temp-buffer s |
| 460 | (goto-line 1) | 464 | (goto-line 1) |
| 461 | (ruby-end-of-block) | 465 | (ruby-end-of-block) |
| 462 | (should (= 4 (line-number-at-pos))) | 466 | (should (= 5 (line-number-at-pos))) |
| 463 | (ruby-beginning-of-block) | 467 | (ruby-beginning-of-block) |
| 464 | (should (= 1 (line-number-at-pos)))))) | 468 | (should (= 1 (line-number-at-pos)))))) |
| 465 | 469 | ||
| 470 | (ert-deftest ruby-move-to-block-skips-heredoc () | ||
| 471 | (ruby-with-temp-buffer | ||
| 472 | (ruby-test-string | ||
| 473 | "if something_wrong? | ||
| 474 | | ActiveSupport::Deprecation.warn(<<-eowarn) | ||
| 475 | | boo hoo | ||
| 476 | | end | ||
| 477 | | eowarn | ||
| 478 | |end") | ||
| 479 | (goto-line 1) | ||
| 480 | (ruby-end-of-block) | ||
| 481 | (should (= 6 (line-number-at-pos))) | ||
| 482 | (ruby-beginning-of-block) | ||
| 483 | (should (= 1 (line-number-at-pos))))) | ||
| 484 | |||
| 466 | (provide 'ruby-mode-tests) | 485 | (provide 'ruby-mode-tests) |
| 467 | 486 | ||
| 468 | ;;; ruby-mode-tests.el ends here | 487 | ;;; ruby-mode-tests.el ends here |