diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-03-27 17:16:59 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2023-03-27 17:16:59 -0400 |
commit | eb166287f3de74ab918e66e5e394554fb7acb9af (patch) | |
tree | 1929b53158cb313d4e45f5f04d2febfd33d2cb3c /test | |
parent | b0d5f5168c1f4c3a321de8186858ff806fc5d720 (diff) | |
parent | edc460e3b6c38eee97dde847987b2c29dd134653 (diff) | |
download | emacs-eb166287f3de74ab918e66e5e394554fb7acb9af.tar.gz |
Merge from origin/emacs-29
edc460e3b6c Fix accidental backward-incompatible change (bug#62417)
cbef1422fe3 ruby-ts-mode: Fix/simplify Imenu index generation
a0d5fba74a6 (ruby-ts--align-chain): Use 'equal' to check for an exact...
Diffstat (limited to 'test')
-rw-r--r-- | test/lisp/progmodes/ruby-ts-mode-tests.el | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/lisp/progmodes/ruby-ts-mode-tests.el b/test/lisp/progmodes/ruby-ts-mode-tests.el index e0d9f1b5c50..11125dc5cd3 100644 --- a/test/lisp/progmodes/ruby-ts-mode-tests.el +++ b/test/lisp/progmodes/ruby-ts-mode-tests.el @@ -281,6 +281,31 @@ The whitespace before and including \"|\" on each line is removed." (file-truename (expand-file-name (format "ruby-mode-resources/%s" ,file)))))) +(ert-deftest ruby-ts-imenu-index () + (ruby-ts-with-temp-buffer + (ruby-ts-test-string + "module Foo + | class Blub + | def hi + | 'Hi!' + | end + | + | def bye + | 'Bye!' + | end + | + | private def self.hiding + | 'You can't see me' + | end + | end + |end") + (should (equal (mapcar #'car (ruby-ts--imenu)) + '("Foo" + "Foo::Blub" + "Foo::Blub#hi" + "Foo::Blub#bye" + "Foo::Blub.hiding"))))) + (defmacro ruby-ts-deftest-indent (file) `(ert-deftest ,(intern (format "ruby-ts-indent-test/%s" file)) () ;; :tags '(:expensive-test) |