aboutsummaryrefslogtreecommitdiffstats
path: root/test/automated/python-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/automated/python-tests.el')
-rw-r--r--test/automated/python-tests.el54
1 files changed, 30 insertions, 24 deletions
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)