diff options
Diffstat (limited to 'test/lisp/progmodes/ruby-mode-tests.el')
-rw-r--r-- | test/lisp/progmodes/ruby-mode-tests.el | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/test/lisp/progmodes/ruby-mode-tests.el b/test/lisp/progmodes/ruby-mode-tests.el index 9be01dc78f9..560f780285a 100644 --- a/test/lisp/progmodes/ruby-mode-tests.el +++ b/test/lisp/progmodes/ruby-mode-tests.el @@ -943,16 +943,20 @@ VALUES-PLIST is a list with alternating index and value elements." "Blub#bye" "Blub#hiding"))))) -(ert-deftest ruby--indent/converted-from-manual-test () - :tags '(:expensive-test) - ;; Converted from manual test. - (let ((buf (find-file-noselect (ert-resource-file "ruby.rb")))) - (unwind-protect - (with-current-buffer buf - (let ((orig (buffer-string))) - (indent-region (point-min) (point-max)) - (should (equal (buffer-string) orig)))) - (kill-buffer buf)))) +(defmacro ruby-deftest-indent (file) + `(ert-deftest ,(intern (format "ruby-indent-test/%s" file)) () + ;; :tags '(:expensive-test) + (let ((buf (find-file-noselect (ert-resource-file ,file)))) + (unwind-protect + (with-current-buffer buf + (let ((orig (buffer-string))) + ;; Indent and check that we get the original text. + (indent-region (point-min) (point-max)) + (should (equal (buffer-string) orig)))) + (kill-buffer buf))))) + +(ruby-deftest-indent "ruby.rb") +(ruby-deftest-indent "ruby-method-params-indent.rb") (ert-deftest ruby--test-chained-indentation () (with-temp-buffer |