aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog7
-rw-r--r--test/automated/electric-tests.el44
2 files changed, 50 insertions, 1 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index c94bf21fd36..5aca4a1d063 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,5 +1,12 @@
12014-04-07 João Távora <joaotavora@gmail.com> 12014-04-07 João Távora <joaotavora@gmail.com>
2 2
3 * automated/electric-tests.el (define-electric-pair-test): Don't
4 overtest..
5 (inhibit-in-mismatched-string-inside-ruby-comments): New test.
6 (inhibit-in-mismatched-string-inside-c-comments): New test.
7
82014-04-07 João Távora <joaotavora@gmail.com>
9
3 * automated/electric-tests.el (inhibit-if-strings-mismatched): 10 * automated/electric-tests.el (inhibit-if-strings-mismatched):
4 New test, change from `inhibit-only-of-next-is-mismatched'. 11 New test, change from `inhibit-only-of-next-is-mismatched'.
5 12
diff --git a/test/automated/electric-tests.el b/test/automated/electric-tests.el
index 301130747f3..bcef9cc2adb 100644
--- a/test/automated/electric-tests.el
+++ b/test/automated/electric-tests.el
@@ -141,7 +141,7 @@ Should %s |%s| and point at %d"
141 expected-string 141 expected-string
142 expected-point 142 expected-point
143 bindings 143 bindings
144 (modes '(quote (emacs-lisp-mode ruby-mode c++-mode))) 144 (modes '(quote (ruby-mode c++-mode)))
145 (test-in-comments t) 145 (test-in-comments t)
146 (test-in-strings t) 146 (test-in-strings t)
147 (test-in-code t) 147 (test-in-code t)
@@ -303,6 +303,48 @@ Should %s |%s| and point at %d"
303 :bindings `((electric-pair-text-syntax-table 303 :bindings `((electric-pair-text-syntax-table
304 . ,prog-mode-syntax-table))) 304 . ,prog-mode-syntax-table)))
305 305
306(define-electric-pair-test inhibit-in-mismatched-string-inside-ruby-comments
307 "foo\"\"
308#
309# \"bar\"
310# \" \"
311# \"
312#
313baz\"\""
314 "\""
315 :modes '(ruby-mode)
316 :test-in-strings nil
317 :test-in-comments nil
318 :expected-point 19
319 :expected-string
320 "foo\"\"
321#
322# \"bar\"\"
323# \" \"
324# \"
325#
326baz\"\""
327 :fixture-fn #'(lambda () (goto-char (point-min)) (search-forward "bar")))
328
329(define-electric-pair-test inhibit-in-mismatched-string-inside-c-comments
330 "foo\"\"/*
331 \"bar\"
332 \" \"
333 \"
334*/baz\"\""
335 "\""
336 :modes '(c-mode)
337 :test-in-strings nil
338 :test-in-comments nil
339 :expected-point 18
340 :expected-string
341 "foo\"\"/*
342 \"bar\"\"
343 \" \"
344 \"
345*/baz\"\""
346 :fixture-fn #'(lambda () (goto-char (point-min)) (search-forward "bar")))
347
306 348
307;;; More quotes, but now don't bind `electric-pair-text-syntax-table' 349;;; More quotes, but now don't bind `electric-pair-text-syntax-table'
308;;; to `prog-mode-syntax-table'. Use the defaults for 350;;; to `prog-mode-syntax-table'. Use the defaults for