aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJoakim Verona2013-06-12 12:32:25 +0200
committerJoakim Verona2013-06-12 12:32:25 +0200
commite6fa6da6899bf1b4877b96c450eae3934085d560 (patch)
tree48e6fda463d24a792ec8428fb8044a250ee2ff82 /test
parent4f0994366d33f8f76db4662cc126720866df3461 (diff)
parent84d6f46535554f9f51aae3314313112e8d755c65 (diff)
downloademacs-e6fa6da6899bf1b4877b96c450eae3934085d560.tar.gz
emacs-e6fa6da6899bf1b4877b96c450eae3934085d560.zip
Merge branch 'trunk' into xwidget
Conflicts: src/Makefile.in src/keyboard.c src/termhooks.h
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/automated/ruby-mode-tests.el20
2 files changed, 25 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 56e019ec4af..98fb2e3da1f 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
12013-05-31 Dmitry Gutov <dgutov@yandex.ru>
2
3 * automated/ruby-mode-tests.el: New tests, for percent literals
4 and expression expansion.
5
12013-05-29 Leo Liu <sdl.web@gmail.com> 62013-05-29 Leo Liu <sdl.web@gmail.com>
2 7
3 * indent/octave.m: Tweak. 8 * indent/octave.m: Tweak.
diff --git a/test/automated/ruby-mode-tests.el b/test/automated/ruby-mode-tests.el
index e52927a2968..77dd62821f7 100644
--- a/test/automated/ruby-mode-tests.el
+++ b/test/automated/ruby-mode-tests.el
@@ -112,6 +112,9 @@ VALUES-PLIST is a list with alternating index and value elements."
112(ert-deftest ruby-regexp-starts-after-string () 112(ert-deftest ruby-regexp-starts-after-string ()
113 (ruby-assert-state "'(/', /\d+/" 3 ?/ 8)) 113 (ruby-assert-state "'(/', /\d+/" 3 ?/ 8))
114 114
115(ert-deftest ruby-regexp-interpolation-is-highlighted ()
116 (ruby-assert-face "/#{foobs}/" 4 font-lock-variable-name-face))
117
115(ert-deftest ruby-regexp-skips-over-interpolation () 118(ert-deftest ruby-regexp-skips-over-interpolation ()
116 (ruby-assert-state "/#{foobs.join('/')}/" 3 nil)) 119 (ruby-assert-state "/#{foobs.join('/')}/" 3 nil))
117 120
@@ -353,6 +356,23 @@ VALUES-PLIST is a list with alternating index and value elements."
353 ;; It's confused by the closing paren in the middle. 356 ;; It's confused by the closing paren in the middle.
354 (ruby-assert-state s 8 nil))) 357 (ruby-assert-state s 8 nil)))
355 358
359(ert-deftest ruby-interpolation-inside-double-quoted-percent-literals ()
360 (ruby-assert-face "%Q{foo #@bar}" 8 font-lock-variable-name-face)
361 (ruby-assert-face "%W{foo #@bar}" 8 font-lock-variable-name-face)
362 (ruby-assert-face "%r{foo #@bar}" 8 font-lock-variable-name-face)
363 (ruby-assert-face "%x{foo #@bar}" 8 font-lock-variable-name-face))
364
365(ert-deftest ruby-no-interpolation-in-single-quoted-literals ()
366 (ruby-assert-face "'foo #@bar'" 7 font-lock-string-face)
367 (ruby-assert-face "%q{foo #@bar}" 8 font-lock-string-face)
368 (ruby-assert-face "%w{foo #@bar}" 8 font-lock-string-face)
369 (ruby-assert-face "%s{foo #@bar}" 8 font-lock-string-face))
370
371(ert-deftest ruby-no-unknown-percent-literals ()
372 ;; No folding of case.
373 (ruby-assert-face "%S{foo}" 4 nil)
374 (ruby-assert-face "%R{foo}" 4 nil))
375
356(ert-deftest ruby-add-log-current-method-examples () 376(ert-deftest ruby-add-log-current-method-examples ()
357 (let ((pairs '(("foo" . "#foo") 377 (let ((pairs '(("foo" . "#foo")
358 ("C.foo" . ".foo") 378 ("C.foo" . ".foo")