diff options
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index a172f0f8e9c..6ab9c62746e 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -5282,7 +5282,7 @@ urlpatterns = patterns('', | |||
| 5282 | (should (= (current-indentation) 23)))) | 5282 | (should (= (current-indentation) 23)))) |
| 5283 | (or eim (electric-indent-mode -1))))) | 5283 | (or eim (electric-indent-mode -1))))) |
| 5284 | 5284 | ||
| 5285 | (ert-deftest python-triple-quote-pairing () | 5285 | (ert-deftest python-triple-double-quote-pairing () |
| 5286 | (let ((epm electric-pair-mode)) | 5286 | (let ((epm electric-pair-mode)) |
| 5287 | (unwind-protect | 5287 | (unwind-protect |
| 5288 | (progn | 5288 | (progn |
| @@ -5309,6 +5309,33 @@ urlpatterns = patterns('', | |||
| 5309 | "\"\n\"\"\"\n")))) | 5309 | "\"\n\"\"\"\n")))) |
| 5310 | (or epm (electric-pair-mode -1))))) | 5310 | (or epm (electric-pair-mode -1))))) |
| 5311 | 5311 | ||
| 5312 | (ert-deftest python-triple-single-quote-pairing () | ||
| 5313 | (let ((epm electric-pair-mode)) | ||
| 5314 | (unwind-protect | ||
| 5315 | (progn | ||
| 5316 | (python-tests-with-temp-buffer | ||
| 5317 | "''\n" | ||
| 5318 | (or epm (electric-pair-mode 1)) | ||
| 5319 | (goto-char (1- (point-max))) | ||
| 5320 | (python-tests-self-insert ?') | ||
| 5321 | (should (string= (buffer-string) | ||
| 5322 | "''''''\n")) | ||
| 5323 | (should (= (point) 4))) | ||
| 5324 | (python-tests-with-temp-buffer | ||
| 5325 | "\n" | ||
| 5326 | (python-tests-self-insert (list ?' ?' ?')) | ||
| 5327 | (should (string= (buffer-string) | ||
| 5328 | "''''''\n")) | ||
| 5329 | (should (= (point) 4))) | ||
| 5330 | (python-tests-with-temp-buffer | ||
| 5331 | "'\n''\n" | ||
| 5332 | (goto-char (1- (point-max))) | ||
| 5333 | (python-tests-self-insert ?') | ||
| 5334 | (should (= (point) (1- (point-max)))) | ||
| 5335 | (should (string= (buffer-string) | ||
| 5336 | "'\n'''\n")))) | ||
| 5337 | (or epm (electric-pair-mode -1))))) | ||
| 5338 | |||
| 5312 | 5339 | ||
| 5313 | ;;; Hideshow support | 5340 | ;;; Hideshow support |
| 5314 | 5341 | ||