aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGlenn Morris2014-04-08 20:37:56 -0700
committerGlenn Morris2014-04-08 20:37:56 -0700
commit559836fbccf9c79c621da96fe8ca0080b980b14c (patch)
tree4bf9792cdcf01bc71746845f5a1277da4a8ea687 /test
parent6bc76cee212aab0a2c02f8c28213fc842cc7880f (diff)
parent50c9a9b8a871ce281b43a196bd912f3d2fdda5fa (diff)
downloademacs-559836fbccf9c79c621da96fe8ca0080b980b14c.tar.gz
emacs-559836fbccf9c79c621da96fe8ca0080b980b14c.zip
Merge from emacs-24; up to 2014-04-02T16:17:08Z!dmantipov@yandex.ru
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog8
-rw-r--r--test/automated/electric-tests.el2
-rw-r--r--test/automated/python-tests.el54
3 files changed, 39 insertions, 25 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index fb969069c6c..c27b9b5f437 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,11 @@
12014-04-09 Glenn Morris <rgm@gnu.org>
2
3 * automated/python-tests.el (python-triple-quote-pairing):
4 Enable/disable electric-pair-mode as needed.
5
6 * automated/electric-tests.el (electric-pair-backspace-1):
7 Replace deleted function.
8
12014-04-07 João Távora <joaotavora@gmail.com> 92014-04-07 João Távora <joaotavora@gmail.com>
2 10
3 * automated/python-tests.el (python-triple-quote-pairing): New test. 11 * automated/python-tests.el (python-triple-quote-pairing): New test.
diff --git a/test/automated/electric-tests.el b/test/automated/electric-tests.el
index bcef9cc2adb..6a70080fde5 100644
--- a/test/automated/electric-tests.el
+++ b/test/automated/electric-tests.el
@@ -509,7 +509,7 @@ baz\"\""
509 (with-temp-buffer 509 (with-temp-buffer
510 (insert "()") 510 (insert "()")
511 (goto-char 2) 511 (goto-char 2)
512 (electric-pair-backward-delete-char 1) 512 (electric-pair-delete-pair 1)
513 (should (equal "" (buffer-string)))))) 513 (should (equal "" (buffer-string))))))
514 514
515 515
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el
index 8fe8f71264f..de963a670bc 100644
--- a/test/automated/python-tests.el
+++ b/test/automated/python-tests.el
@@ -2722,30 +2722,36 @@ def foo(a, b, c):
2722 (should (= (point) (point-min))))) 2722 (should (= (point) (point-min)))))
2723 2723
2724(ert-deftest python-triple-quote-pairing () 2724(ert-deftest python-triple-quote-pairing ()
2725 (python-tests-with-temp-buffer 2725 (require 'electric)
2726 "\"\"\n" 2726 (let ((epm electric-pair-mode))
2727 (goto-char (1- (point-max))) 2727 (unwind-protect
2728 (let ((last-command-event ?\")) 2728 (progn
2729 (call-interactively 'self-insert-command)) 2729 (python-tests-with-temp-buffer
2730 (should (string= (buffer-string) 2730 "\"\"\n"
2731 "\"\"\"\"\"\"\n")) 2731 (or epm (electric-pair-mode 1))
2732 (should (= (point) 4))) 2732 (goto-char (1- (point-max)))
2733 (python-tests-with-temp-buffer 2733 (let ((last-command-event ?\"))
2734 "\n" 2734 (call-interactively 'self-insert-command))
2735 (let ((last-command-event ?\")) 2735 (should (string= (buffer-string)
2736 (dotimes (i 3) 2736 "\"\"\"\"\"\"\n"))
2737 (call-interactively 'self-insert-command))) 2737 (should (= (point) 4)))
2738 (should (string= (buffer-string) 2738 (python-tests-with-temp-buffer
2739 "\"\"\"\"\"\"\n")) 2739 "\n"
2740 (should (= (point) 4))) 2740 (let ((last-command-event ?\"))
2741 (python-tests-with-temp-buffer 2741 (dotimes (i 3)
2742 "\"\n\"\"\n" 2742 (call-interactively 'self-insert-command)))
2743 (goto-char (1- (point-max))) 2743 (should (string= (buffer-string)
2744 (let ((last-command-event ?\")) 2744 "\"\"\"\"\"\"\n"))
2745 (call-interactively 'self-insert-command)) 2745 (should (= (point) 4)))
2746 (should (= (point) (1- (point-max)))) 2746 (python-tests-with-temp-buffer
2747 (should (string= (buffer-string) 2747 "\"\n\"\"\n"
2748 "\"\n\"\"\"\n")))) 2748 (goto-char (1- (point-max)))
2749 (let ((last-command-event ?\"))
2750 (call-interactively 'self-insert-command))
2751 (should (= (point) (1- (point-max))))
2752 (should (string= (buffer-string)
2753 "\"\n\"\"\"\n"))))
2754 (or epm (electric-pair-mode -1)))))
2749 2755
2750 2756
2751(provide 'python-tests) 2757(provide 'python-tests)