diff options
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index ee7b66610aa..a3f778bbbe9 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -1516,6 +1516,31 @@ this is an arbitrarily | |||
| 1516 | (should (string= (buffer-substring-no-properties (point-min) (point-max)) | 1516 | (should (string= (buffer-substring-no-properties (point-min) (point-max)) |
| 1517 | expected))))) | 1517 | expected))))) |
| 1518 | 1518 | ||
| 1519 | (ert-deftest python-indent-after-match-block () | ||
| 1520 | "Test PEP634 match." | ||
| 1521 | (python-tests-with-temp-buffer | ||
| 1522 | " | ||
| 1523 | match foo: | ||
| 1524 | " | ||
| 1525 | (should (eq (car (python-indent-context)) :no-indent)) | ||
| 1526 | (should (= (python-indent-calculate-indentation) 0)) | ||
| 1527 | (goto-char (point-max)) | ||
| 1528 | (should (eq (car (python-indent-context)) :after-block-start)) | ||
| 1529 | (should (= (python-indent-calculate-indentation) 4)))) | ||
| 1530 | |||
| 1531 | (ert-deftest python-indent-after-case-block () | ||
| 1532 | "Test PEP634 case." | ||
| 1533 | (python-tests-with-temp-buffer | ||
| 1534 | " | ||
| 1535 | match foo: | ||
| 1536 | case 1: | ||
| 1537 | " | ||
| 1538 | (should (eq (car (python-indent-context)) :no-indent)) | ||
| 1539 | (should (= (python-indent-calculate-indentation) 0)) | ||
| 1540 | (goto-char (point-max)) | ||
| 1541 | (should (eq (car (python-indent-context)) :after-block-start)) | ||
| 1542 | (should (= (python-indent-calculate-indentation) 8)))) | ||
| 1543 | |||
| 1519 | 1544 | ||
| 1520 | ;;; Filling | 1545 | ;;; Filling |
| 1521 | 1546 | ||