summaryrefslogtreecommitdiff
path: root/test/automated
diff options
context:
space:
mode:
authorJoao Tavora <joaotavora@gmail.com>2014-12-14 11:22:46 +0000
committerJoao Tavora <joaotavora@gmail.com>2014-12-14 11:22:46 +0000
commitbb57c94d5f047cde106ffa71bf59f24b2b3027b8 (patch)
tree90bcb89e16d1fef22bd06d8035ac0797b11def88 /test/automated
parent7b945728d3db91732ace3d3a1cb1c4bdea444b2c (diff)
downloademacs-bb57c94d5f047cde106ffa71bf59f24b2b3027b8.tar.gz
Consider electric-pair-mode in tex-mode.
Fixes: debbugs:19356 * lisp/textmodes/tex-mode.el (tex-insert-quote): Consider and respect `electric-pair-mode'. * test/automated/electric-tests.el (autowrapping-7): New test for tex-mode's autowrapping. (electric-pair-test-for): Call the actual key-binding interactively.
Diffstat (limited to 'test/automated')
-rw-r--r--test/automated/electric-tests.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/automated/electric-tests.el b/test/automated/electric-tests.el
index b1908e6bb32..cd07213bf20 100644
--- a/test/automated/electric-tests.el
+++ b/test/automated/electric-tests.el
@@ -60,7 +60,7 @@
(cl-progv
(mapcar #'car bindings)
(mapcar #'cdr bindings)
- (self-insert-command 1))))
+ (call-interactively (key-binding `[,last-command-event])))))
(should (equal (buffer-substring-no-properties (point-min) (point-max))
expected-string))
(should (equal (point)
@@ -575,5 +575,14 @@ baz\"\""
(skip-chars-backward "\"")
(mark-sexp -1)))
+(define-electric-pair-test autowrapping-7
+ "foo" "\"" :expected-string "``foo''" :expected-point 8
+ :modes '(tex-mode)
+ :fixture-fn #'(lambda ()
+ (electric-pair-mode 1)
+ (goto-char (point-max))
+ (skip-chars-backward "\"")
+ (mark-sexp -1)))
+
(provide 'electric-tests)
;;; electric-tests.el ends here