diff options
| author | Dmitry Gutov | 2016-06-27 07:26:46 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2016-06-27 07:31:52 +0300 |
| commit | 15c307417f7bc13b27f06994dd931cb04873a26f (patch) | |
| tree | 25f2ce5d9c47052728892d193e2b64e07bf7a3aa /test | |
| parent | 7f02dedfcae6ba0e3a646c1367c908af9b3dbe1d (diff) | |
| download | emacs-15c307417f7bc13b27f06994dd931cb04873a26f.tar.gz emacs-15c307417f7bc13b27f06994dd931cb04873a26f.zip | |
Also handle escaping when string begins with a quote
* lisp/progmodes/ruby-mode.el (ruby-toggle-string-quotes):
Handle quoting of the first character in the string.
* test/lisp/progmodes/ruby-mode-tests.el
(ruby-toggle-string-quotes-quotes-correctly): Update.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/progmodes/ruby-mode-tests.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/lisp/progmodes/ruby-mode-tests.el b/test/lisp/progmodes/ruby-mode-tests.el index 5dd34f8ee41..97f277bff41 100644 --- a/test/lisp/progmodes/ruby-mode-tests.el +++ b/test/lisp/progmodes/ruby-mode-tests.el | |||
| @@ -718,8 +718,8 @@ VALUES-PLIST is a list with alternating index and value elements." | |||
| 718 | 718 | ||
| 719 | (ert-deftest ruby-toggle-string-quotes-quotes-correctly () | 719 | (ert-deftest ruby-toggle-string-quotes-quotes-correctly () |
| 720 | (let ((pairs | 720 | (let ((pairs |
| 721 | '(("puts 'foo\"\\''" . "puts \"foo\\\"'\"") | 721 | '(("puts '\"foo\"\\''" . "puts \"\\\"foo\\\"'\"") |
| 722 | ("puts \"foo'\\\"\"" . "puts 'foo\\'\"'")))) | 722 | ("puts \"'foo'\\\"\"" . "puts '\\'foo\\'\"'")))) |
| 723 | (dolist (pair pairs) | 723 | (dolist (pair pairs) |
| 724 | (ruby-with-temp-buffer (car pair) | 724 | (ruby-with-temp-buffer (car pair) |
| 725 | (beginning-of-line) | 725 | (beginning-of-line) |