diff options
| -rw-r--r-- | test/lisp/ibuffer-tests.el | 4 | ||||
| -rw-r--r-- | test/lisp/net/tramp-tests.el | 5 | ||||
| -rw-r--r-- | test/lisp/progmodes/elisp-mode-tests.el | 28 |
3 files changed, 25 insertions, 12 deletions
diff --git a/test/lisp/ibuffer-tests.el b/test/lisp/ibuffer-tests.el index ff5162fefa5..c1d9ed9fc3b 100644 --- a/test/lisp/ibuffer-tests.el +++ b/test/lisp/ibuffer-tests.el | |||
| @@ -312,8 +312,8 @@ | |||
| 312 | (funcall create-non-file-buffer "ibuf-test-3.b" :size 50 | 312 | (funcall create-non-file-buffer "ibuf-test-3.b" :size 50 |
| 313 | :mode #'text-mode | 313 | :mode #'text-mode |
| 314 | :include-content "...but a multitude of drops?\n")) | 314 | :include-content "...but a multitude of drops?\n")) |
| 315 | (dirA (with-current-buffer bufA default-directory)) | 315 | (dirA (regexp-quote (with-current-buffer bufA default-directory))) |
| 316 | (dirB (with-current-buffer bufB default-directory))) | 316 | (dirB (regexp-quote (with-current-buffer bufB default-directory)))) |
| 317 | (should (ibuffer-included-in-filters-p | 317 | (should (ibuffer-included-in-filters-p |
| 318 | bufA '((basename . "ibuf-test-3")))) | 318 | bufA '((basename . "ibuf-test-3")))) |
| 319 | (should (ibuffer-included-in-filters-p | 319 | (should (ibuffer-included-in-filters-p |
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 4a74e8b78df..8c67687e32c 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el | |||
| @@ -5352,8 +5352,9 @@ process sentinels. They shall not disturb each other." | |||
| 5352 | (string-match | 5352 | (string-match |
| 5353 | (format | 5353 | (format |
| 5354 | "Loading %s" | 5354 | "Loading %s" |
| 5355 | (expand-file-name | 5355 | (regexp-quote |
| 5356 | "tramp-cmds" (file-name-directory (locate-library "tramp")))) | 5356 | (expand-file-name |
| 5357 | "tramp-cmds" (file-name-directory (locate-library "tramp"))))) | ||
| 5357 | (shell-command-to-string | 5358 | (shell-command-to-string |
| 5358 | (format | 5359 | (format |
| 5359 | "%s -batch -Q -L %s -l tramp-sh --eval %s" | 5360 | "%s -batch -Q -L %s -l tramp-sh --eval %s" |
diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index 941e85bc890..97148efde41 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el | |||
| @@ -298,6 +298,16 @@ | |||
| 298 | ))) | 298 | ))) |
| 299 | 299 | ||
| 300 | 300 | ||
| 301 | ;; tmp may be on a different filesystem to the tests, but, ehh. | ||
| 302 | (defvar xref--case-insensitive | ||
| 303 | (let ((dir (make-temp-file "xref-test" t))) | ||
| 304 | (unwind-protect | ||
| 305 | (progn | ||
| 306 | (with-temp-file (expand-file-name "hElLo" dir) "hello") | ||
| 307 | (file-exists-p (expand-file-name "HELLO" dir))) | ||
| 308 | (delete-directory dir t))) | ||
| 309 | "Non-nil if file system seems to be case-insensitive.") | ||
| 310 | |||
| 301 | (defun xref-elisp-test-run (xrefs expected-xrefs) | 311 | (defun xref-elisp-test-run (xrefs expected-xrefs) |
| 302 | (should (= (length xrefs) (length expected-xrefs))) | 312 | (should (= (length xrefs) (length expected-xrefs))) |
| 303 | (while xrefs | 313 | (while xrefs |
| @@ -307,11 +317,13 @@ | |||
| 307 | (expected-source (when (consp expected) (cdr expected)))) | 317 | (expected-source (when (consp expected) (cdr expected)))) |
| 308 | 318 | ||
| 309 | ;; Downcase the filenames for case-insensitive file systems. | 319 | ;; Downcase the filenames for case-insensitive file systems. |
| 310 | (setf (xref-elisp-location-file (oref xref location)) | 320 | (when xref--case-insensitive |
| 311 | (downcase (xref-elisp-location-file (oref xref location)))) | 321 | (setf (xref-elisp-location-file (oref xref location)) |
| 322 | (downcase (xref-elisp-location-file (oref xref location)))) | ||
| 312 | 323 | ||
| 313 | (setf (xref-elisp-location-file (oref expected-xref location)) | 324 | (setf (xref-elisp-location-file (oref expected-xref location)) |
| 314 | (downcase (xref-elisp-location-file (oref expected-xref location)))) | 325 | (downcase (xref-elisp-location-file |
| 326 | (oref expected-xref location))))) | ||
| 315 | 327 | ||
| 316 | (should (equal xref expected-xref)) | 328 | (should (equal xref expected-xref)) |
| 317 | 329 | ||
| @@ -346,10 +358,10 @@ to (xref-elisp-test-descr-to-target xref)." | |||
| 346 | ;; `load-path' has the correct case, so this causes the expected test | 358 | ;; `load-path' has the correct case, so this causes the expected test |
| 347 | ;; values to have the wrong case). This is handled in | 359 | ;; values to have the wrong case). This is handled in |
| 348 | ;; `xref-elisp-test-run'. | 360 | ;; `xref-elisp-test-run'. |
| 349 | (defconst emacs-test-dir | 361 | (defvar emacs-test-dir |
| 350 | (downcase | 362 | (funcall (if xref--case-insensitive 'downcase 'identity) |
| 351 | (file-truename (file-name-directory | 363 | (file-truename (file-name-directory |
| 352 | (or load-file-name (buffer-file-name)))))) | 364 | (or load-file-name (buffer-file-name)))))) |
| 353 | 365 | ||
| 354 | 366 | ||
| 355 | ;; alphabetical by test name | 367 | ;; alphabetical by test name |