diff options
| author | YAMAMOTO Mitsuharu | 2019-04-27 18:33:39 +0900 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2019-04-27 18:33:39 +0900 |
| commit | 886bedb36c7b959b7e6fc8ce8e0c04e144b0ae28 (patch) | |
| tree | b5770d9fc10a704ad8aeb3474c6940121252c770 /test/lisp/progmodes/python-tests.el | |
| parent | 015a6e1df2772bd43680df5cbeaffccf98a881da (diff) | |
| parent | 8dc00b2f1e6523c634df3e24379afbe712a32b27 (diff) | |
| download | emacs-886bedb36c7b959b7e6fc8ce8e0c04e144b0ae28.tar.gz emacs-886bedb36c7b959b7e6fc8ce8e0c04e144b0ae28.zip | |
Merge branch 'master' into harfbuzz
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 0b9f8484c10..b940f45bb90 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; python-tests.el --- Test suite for python.el | 1 | ;;; python-tests.el --- Test suite for python.el |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2013-2018 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2013-2019 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; This file is part of GNU Emacs. | 5 | ;; This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -1161,10 +1161,13 @@ def b() | |||
| 1161 | if do: | 1161 | if do: |
| 1162 | something() | 1162 | something() |
| 1163 | else | 1163 | else |
| 1164 | outside | ||
| 1164 | " | 1165 | " |
| 1165 | (python-tests-look-at "else") | 1166 | (python-tests-look-at "else") |
| 1166 | (goto-char (line-end-position)) | 1167 | (goto-char (line-end-position)) |
| 1167 | (python-tests-self-insert ":") | 1168 | (python-tests-self-insert ":") |
| 1169 | (should (= (current-indentation) 0)) | ||
| 1170 | (python-tests-look-at "outside") | ||
| 1168 | (should (= (current-indentation) 0)))) | 1171 | (should (= (current-indentation) 0)))) |
| 1169 | 1172 | ||
| 1170 | (ert-deftest python-indent-electric-colon-3 () | 1173 | (ert-deftest python-indent-electric-colon-3 () |
| @@ -5342,13 +5345,23 @@ class SomeClass: | |||
| 5342 | (ert-deftest python-tests--python-nav-end-of-statement--infloop () | 5345 | (ert-deftest python-tests--python-nav-end-of-statement--infloop () |
| 5343 | "Checks that `python-nav-end-of-statement' doesn't infloop in a | 5346 | "Checks that `python-nav-end-of-statement' doesn't infloop in a |
| 5344 | buffer with overlapping strings." | 5347 | buffer with overlapping strings." |
| 5348 | ;; FIXME: The treatment of strings has changed in the mean time, and the | ||
| 5349 | ;; test below now neither signals an error nor inf-loops. | ||
| 5350 | ;; The description of the problem it's trying to catch is not clear enough | ||
| 5351 | ;; to be able to see if the underlying problem is really fixed, sadly. | ||
| 5352 | ;; E.g. I don't know what is meant by "overlap", really. | ||
| 5353 | :tags '(:unstable) | ||
| 5345 | (python-tests-with-temp-buffer "''' '\n''' ' '\n" | 5354 | (python-tests-with-temp-buffer "''' '\n''' ' '\n" |
| 5346 | (syntax-propertize (point-max)) | 5355 | (syntax-propertize (point-max)) |
| 5347 | ;; Create a situation where strings nominally overlap. This | 5356 | ;; Create a situation where strings nominally overlap. This |
| 5348 | ;; shouldn't happen in practice, but apparently it can happen when | 5357 | ;; shouldn't happen in practice, but apparently it can happen when |
| 5349 | ;; a package calls `syntax-ppss' in a narrowed buffer during JIT | 5358 | ;; a package calls `syntax-ppss' in a narrowed buffer during JIT |
| 5350 | ;; lock. | 5359 | ;; lock. |
| 5360 | ;; FIXME: 4-5 is the SPC right after the opening triple quotes: why | ||
| 5361 | ;; put a string-fence syntax on it? | ||
| 5351 | (put-text-property 4 5 'syntax-table (string-to-syntax "|")) | 5362 | (put-text-property 4 5 'syntax-table (string-to-syntax "|")) |
| 5363 | ;; FIXME: 8-9 is the middle quote in the closing triple quotes: | ||
| 5364 | ;; it shouldn't have any syntax-table property to remove anyway! | ||
| 5352 | (remove-text-properties 8 9 '(syntax-table nil)) | 5365 | (remove-text-properties 8 9 '(syntax-table nil)) |
| 5353 | (goto-char 4) | 5366 | (goto-char 4) |
| 5354 | (setq-local syntax-propertize-function nil) | 5367 | (setq-local syntax-propertize-function nil) |