diff options
Diffstat (limited to 'test/lisp')
-rw-r--r-- | test/lisp/progmodes/ruby-mode-tests.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lisp/progmodes/ruby-mode-tests.el b/test/lisp/progmodes/ruby-mode-tests.el index 117385ea3e8..a931541ba35 100644 --- a/test/lisp/progmodes/ruby-mode-tests.el +++ b/test/lisp/progmodes/ruby-mode-tests.el @@ -157,6 +157,18 @@ VALUES-PLIST is a list with alternating index and value elements." (ert-deftest ruby-regexp-is-not-mistaken-for-slash-symbol () (ruby-assert-state "x = /foo:/" 3 nil)) +(ert-deftest ruby-slash-not-regexp-when-surrounded-by-spaces () + (ruby-assert-state "x = index / 3" 3 nil)) + +(ert-deftest ruby-slash-not-regexp-when-no-spaces () + (ruby-assert-state "x = index/3" 3 nil)) + +(ert-deftest ruby-regexp-not-division-when-only-space-before () + (ruby-assert-state "x = index /3" 3 ?/)) + +(ert-deftest ruby-slash-not-regexp-when-only-space-after () + (ruby-assert-state "x = index/ 3" 3 nil)) + (ert-deftest ruby-indent-simple () (ruby-should-indent-buffer "if foo |