diff options
Diffstat (limited to 'test/lisp/progmodes/python-tests.el')
| -rw-r--r-- | test/lisp/progmodes/python-tests.el | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index d65ef39abb4..b9130da495d 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el | |||
| @@ -4602,6 +4602,32 @@ and `python-shell-interpreter-args' in the new shell buffer." | |||
| 4602 | "^\\(o\\.t \\|\\)"))) | 4602 | "^\\(o\\.t \\|\\)"))) |
| 4603 | (ignore-errors (delete-file startup-file)))))) | 4603 | (ignore-errors (delete-file startup-file)))))) |
| 4604 | 4604 | ||
| 4605 | (ert-deftest python-shell--convert-file-name-to-send-1 () | ||
| 4606 | "Test parameters consist of a list of the following three elements. | ||
| 4607 | 1. The variable `default-directory' of the process. | ||
| 4608 | 2. FILE-NAME argument. | ||
| 4609 | 3. The expected return value." | ||
| 4610 | (python-tests-with-temp-buffer-with-shell | ||
| 4611 | "" | ||
| 4612 | (let* ((path "/tmp/tmp.py") | ||
| 4613 | (local-path (concat python-shell-local-prefix path)) | ||
| 4614 | (remote1-path (concat "/ssh:remote1:" path)) | ||
| 4615 | (remote2-path (concat "/ssh:remote2:" path)) | ||
| 4616 | (process (python-shell-get-process))) | ||
| 4617 | (dolist | ||
| 4618 | (test (list (list "/tmp" nil nil) | ||
| 4619 | (list "/tmp" path path) | ||
| 4620 | (list "/tmp" local-path path) | ||
| 4621 | (list "/ssh:remote1:/tmp" path local-path) | ||
| 4622 | (list "/ssh:remote1:/tmp" local-path local-path) | ||
| 4623 | (list "/ssh:remote1:/tmp" remote1-path path) | ||
| 4624 | (list "/ssh:remote1:/tmp" remote2-path remote2-path))) | ||
| 4625 | (with-current-buffer (process-buffer process) | ||
| 4626 | (setq default-directory (nth 0 test))) | ||
| 4627 | (should (string= (python-shell--convert-file-name-to-send | ||
| 4628 | process (nth 1 test)) | ||
| 4629 | (nth 2 test))))))) | ||
| 4630 | |||
| 4605 | (ert-deftest python-shell-buffer-substring-1 () | 4631 | (ert-deftest python-shell-buffer-substring-1 () |
| 4606 | "Selecting a substring of the whole buffer must match its contents." | 4632 | "Selecting a substring of the whole buffer must match its contents." |
| 4607 | (python-tests-with-temp-buffer | 4633 | (python-tests-with-temp-buffer |