diff options
| author | Fabián Ezequiel Gallina | 2014-12-27 17:22:29 -0300 |
|---|---|---|
| committer | Fabián Ezequiel Gallina | 2014-12-27 17:22:29 -0300 |
| commit | 433af0a06089885f5a57ef0f3e7d6283e8d51bd5 (patch) | |
| tree | 982766b3e0d415584d1d06c08b5cebb1bc16dd47 /test | |
| parent | a5f38fa1cc8eafe13f2073ebfaa8205b5e919d17 (diff) | |
| download | emacs-433af0a06089885f5a57ef0f3e7d6283e8d51bd5.tar.gz emacs-433af0a06089885f5a57ef0f3e7d6283e8d51bd5.zip | |
* lisp/progmodes/python.el (python-shell-buffer-substring): Handle
cornercase when region sent starts at point-min.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ChangeLog | 4 | ||||
| -rw-r--r-- | test/automated/python-tests.el | 21 |
2 files changed, 25 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 101e9d9caa7..74d46775431 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2014-12-27 Fabián Ezequiel Gallina <fgallina@gnu.org> | 1 | 2014-12-27 Fabián Ezequiel Gallina <fgallina@gnu.org> |
| 2 | 2 | ||
| 3 | (python-shell-buffer-substring-9): New test. | ||
| 4 | |||
| 5 | 2014-12-27 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 6 | |||
| 3 | * automated/python-tests.el (python-shell-buffer-substring-1) | 7 | * automated/python-tests.el (python-shell-buffer-substring-1) |
| 4 | (python-shell-buffer-substring-2, python-shell-buffer-substring-3) | 8 | (python-shell-buffer-substring-2, python-shell-buffer-substring-3) |
| 5 | (python-shell-buffer-substring-4, python-shell-buffer-substring-5) | 9 | (python-shell-buffer-substring-4, python-shell-buffer-substring-5) |
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index 8fcda58e1e0..a4948571242 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el | |||
| @@ -2651,6 +2651,27 @@ class Foo(models.Model): | |||
| 2651 | pass | 2651 | pass |
| 2652 | ")))) | 2652 | ")))) |
| 2653 | 2653 | ||
| 2654 | (ert-deftest python-shell-buffer-substring-9 () | ||
| 2655 | "Check substring starting from `point-min'." | ||
| 2656 | (python-tests-with-temp-buffer | ||
| 2657 | "# coding: utf-8 | ||
| 2658 | |||
| 2659 | class Foo(models.Model): | ||
| 2660 | pass | ||
| 2661 | |||
| 2662 | class Bar(models.Model): | ||
| 2663 | pass | ||
| 2664 | " | ||
| 2665 | (should (string= (python-shell-buffer-substring | ||
| 2666 | (point-min) | ||
| 2667 | (python-tests-look-at "class Bar(models.Model):")) | ||
| 2668 | "# coding: utf-8 | ||
| 2669 | |||
| 2670 | class Foo(models.Model): | ||
| 2671 | pass | ||
| 2672 | |||
| 2673 | ")))) | ||
| 2674 | |||
| 2654 | 2675 | ||
| 2655 | ;;; Shell completion | 2676 | ;;; Shell completion |
| 2656 | 2677 | ||