summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFabián Ezequiel Gallina <fgallina@gnu.org>2014-12-27 17:22:29 -0300
committerFabián Ezequiel Gallina <fgallina@gnu.org>2014-12-27 17:22:29 -0300
commit433af0a06089885f5a57ef0f3e7d6283e8d51bd5 (patch)
tree982766b3e0d415584d1d06c08b5cebb1bc16dd47 /test
parenta5f38fa1cc8eafe13f2073ebfaa8205b5e919d17 (diff)
downloademacs-433af0a06089885f5a57ef0f3e7d6283e8d51bd5.tar.gz
* 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/ChangeLog4
-rw-r--r--test/automated/python-tests.el21
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 @@
2014-12-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
+ (python-shell-buffer-substring-9): New test.
+
+2014-12-27 Fabián Ezequiel Gallina <fgallina@gnu.org>
+
* automated/python-tests.el (python-shell-buffer-substring-1)
(python-shell-buffer-substring-2, python-shell-buffer-substring-3)
(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):
pass
"))))
+(ert-deftest python-shell-buffer-substring-9 ()
+ "Check substring starting from `point-min'."
+ (python-tests-with-temp-buffer
+ "# coding: utf-8
+
+class Foo(models.Model):
+ pass
+
+class Bar(models.Model):
+ pass
+"
+ (should (string= (python-shell-buffer-substring
+ (point-min)
+ (python-tests-look-at "class Bar(models.Model):"))
+ "# coding: utf-8
+
+class Foo(models.Model):
+ pass
+
+"))))
+
;;; Shell completion