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