diff options
author | Noam Postavsky <npostavs@gmail.com> | 2019-06-25 22:04:13 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2019-06-25 22:04:13 -0400 |
commit | 9552ee4df7d2ceebb8728a61d00598aa981b580c (patch) | |
tree | 5bd393a52f3f1b0510ff77fb2bd38e4a2c00ad8c /test/lisp | |
parent | c7a59d87b5726725cffa51a1f432f0961548dbe3 (diff) | |
parent | e62ad04963982ea9cc7622b32484778845bc2ec1 (diff) | |
download | emacs-9552ee4df7d2ceebb8728a61d00598aa981b580c.tar.gz |
Merge from emacs-26
e62ad04963 Fix sgml-mode handling of quotes within parens (Bug#36347)
06b35b2f92 ; * lisp/frame.el: Enhance add-variable-watcher commentary.
572e34bb6f Rename 'make-symbolic-link' argument NEWNAME to LINKNAME
04477adedc Check that length of data returned by sysctl is non-zero
81535eeadb * test/lisp/progmodes/python-tests.el (python-virt-bin): D...
9d48979ca8 Fix Python tests depending on system-type
fcf6cc3177 Fix problem with wdired test when symlinks cannot be created.
4701e0663e Improve wording of documentation of click events
# Conflicts:
# lisp/textmodes/sgml-mode.el
# test/lisp/textmodes/sgml-mode-tests.el
Diffstat (limited to 'test/lisp')
-rw-r--r-- | test/lisp/progmodes/python-tests.el | 20 | ||||
-rw-r--r-- | test/lisp/textmodes/sgml-mode-tests.el | 2 | ||||
-rw-r--r-- | test/lisp/wdired-tests.el | 6 |
3 files changed, 22 insertions, 6 deletions
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 87cee189eac..b1cf7e8806a 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -134,6 +134,16 @@ default to `point-min' and `point-max' respectively." (overlay-end overlay)))) (buffer-substring-no-properties (point-min) (point-max))))) +(defun python-virt-bin (&optional virt-root) + "Return the virtualenv bin dir, starting from VIRT-ROOT. +If nil, VIRT-ROOT defaults to `python-shell-virtualenv-root'. +The name of this directory depends on `system-type'." + (expand-file-name + (concat + (file-name-as-directory (or virt-root + python-shell-virtualenv-root)) + (if (eq system-type 'windows-nt) "Scripts" "bin")))) + ;;; Tests for your tests, so you can test while you test. @@ -2704,7 +2714,7 @@ if x: (python-shell-virtualenv-root "/env") (new-exec-path (python-shell-calculate-exec-path))) (should (equal new-exec-path - (list (expand-file-name "/env/bin") "/path0"))))) + (list (python-virt-bin) "/path0"))))) (ert-deftest python-shell-calculate-exec-path-3 () "Test complete `python-shell-virtualenv-root' modification." @@ -2713,7 +2723,7 @@ if x: (python-shell-virtualenv-root "/env") (new-exec-path (python-shell-calculate-exec-path))) (should (equal new-exec-path - (list (expand-file-name "/env/bin") + (list (python-virt-bin) "/path1" "/path2" "/path0"))))) (ert-deftest python-shell-calculate-exec-path-4 () @@ -2724,7 +2734,7 @@ if x: (python-shell-virtualenv-root "/env") (new-exec-path (python-shell-calculate-exec-path))) (should (equal new-exec-path - (list (expand-file-name "/env/bin") + (list (python-virt-bin) "/path1" "/path2" "/path0"))))) (ert-deftest python-shell-calculate-exec-path-5 () @@ -2754,7 +2764,7 @@ if x: (python-shell-virtualenv-root "/env")) (python-shell-with-environment (should (equal exec-path - (list (expand-file-name "/env/bin") + (list (python-virt-bin) "/path1" "/path2" "/path0"))) (should (not (getenv "PYTHONHOME"))) (should (string= (getenv "VIRTUAL_ENV") "/env"))) @@ -2770,7 +2780,7 @@ if x: (python-shell-virtualenv-root "/env")) (python-shell-with-environment (should (equal (python-shell-calculate-exec-path) - (list (expand-file-name "/env/bin") + (list (python-virt-bin) "/path1" "/path2" "/remote1" "/remote2"))) (let ((process-environment (python-shell-calculate-process-environment))) (should (not (getenv "PYTHONHOME"))) diff --git a/test/lisp/textmodes/sgml-mode-tests.el b/test/lisp/textmodes/sgml-mode-tests.el index 34d26480a45..5630036e55c 100644 --- a/test/lisp/textmodes/sgml-mode-tests.el +++ b/test/lisp/textmodes/sgml-mode-tests.el @@ -171,6 +171,8 @@ The point is set to the beginning of the buffer." "<tag>c>'d</tag>" "<t><!-- \" --></t>" "<t><!-- ' --></t>" + "<t>(')</t>" + "<t>(\")</t>" )) (with-temp-buffer (sgml-mode) diff --git a/test/lisp/wdired-tests.el b/test/lisp/wdired-tests.el index 9682843db29..6db2e03e752 100644 --- a/test/lisp/wdired-tests.el +++ b/test/lisp/wdired-tests.el @@ -86,7 +86,11 @@ only the name before the link arrow." (let ((buf (find-file-noselect test-dir))) (unwind-protect (with-current-buffer buf - (make-symbolic-link "./bar/baz" link-name) + (skip-unless + ;; This check is for wdired, not symbolic links, so skip + ;; it when make-symbolic-link fails for any reason (like + ;; insufficient privileges). + (ignore-errors (make-symbolic-link "./bar/baz" link-name) t)) (revert-buffer) (let* ((file-name (dired-get-filename)) (dir-part (file-name-directory file-name)) |