diff options
| author | Dmitry Gutov | 2013-02-14 09:45:33 +0400 |
|---|---|---|
| committer | Dmitry Gutov | 2013-02-14 09:45:33 +0400 |
| commit | 71a048c16b1a3c8708c161b38e52155b77d0ea60 (patch) | |
| tree | 84895b1fc0a34f1b914a08fd04c9fd2398f8fcf1 /test | |
| parent | 53ca88c478b773f2b56084442c8d17e83577f52c (diff) | |
| download | emacs-71a048c16b1a3c8708c161b38e52155b77d0ea60.tar.gz emacs-71a048c16b1a3c8708c161b38e52155b77d0ea60.zip | |
(ruby-add-log-current-method): Improve performance at the expense
of accuracy. `ruby-block-contains-point' is relatively slow, so
only use it for method and singleton class blocks.
* test/automated/ruby-mode-tests.el
(ruby-add-log-current-method-after-inner-class): Lower
expectations: move point inside a method, initially.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 2 | ||||
| -rw-r--r-- | test/automated/ruby-mode-tests.el | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 7e08eccc2e3..7fed4f29408 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -4,6 +4,8 @@ | |||
| 4 | (ruby-move-to-block-skips-percent-literal): Add depth-affecting | 4 | (ruby-move-to-block-skips-percent-literal): Add depth-affecting |
| 5 | bits inside the examples. | 5 | bits inside the examples. |
| 6 | (ruby-move-to-block-skips-heredoc): New test. | 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. | ||
| 7 | 9 | ||
| 8 | 2013-02-13 Dmitry Gutov <dgutov@yandex.ru> | 10 | 2013-02-13 Dmitry Gutov <dgutov@yandex.ru> |
| 9 | 11 | ||
diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el index 9ee6462f6ad..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 |