diff options
| author | Michael Albinus | 2020-09-13 13:25:52 +0200 |
|---|---|---|
| committer | Michael Albinus | 2020-09-13 13:25:52 +0200 |
| commit | a6321fd7990f4e8e46e850bf60cc49925592ec2a (patch) | |
| tree | b13fd1e34c26f3085de3be95bd4b0f7385a2c1c0 | |
| parent | 18f390af8f11d24c2259131bd45cfd3156cfc234 (diff) | |
| download | emacs-a6321fd7990f4e8e46e850bf60cc49925592ec2a.tar.gz emacs-a6321fd7990f4e8e46e850bf60cc49925592ec2a.zip | |
Fix a conversion failure in tramp-archive-tests (Bug#43353)
* test/lisp/net/tramp-archive-tests.el
(tramp-archive-test-file-archive-hexlified): New defun.
(tramp-archive-test02-file-name-dissect): Use it. (Bug#43353)
| -rw-r--r-- | test/lisp/net/tramp-archive-tests.el | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el index 8c75d91bb58..9a2319126a9 100644 --- a/test/lisp/net/tramp-archive-tests.el +++ b/test/lisp/net/tramp-archive-tests.el | |||
| @@ -48,6 +48,12 @@ | |||
| 48 | (expand-file-name "foo.tar.gz" tramp-archive-test-resource-directory)) | 48 | (expand-file-name "foo.tar.gz" tramp-archive-test-resource-directory)) |
| 49 | "The test file archive.") | 49 | "The test file archive.") |
| 50 | 50 | ||
| 51 | (defun tramp-archive-test-file-archive-hexlified () | ||
| 52 | "Return hexlified `tramp-archive-test-file-archive'. | ||
| 53 | Do not hexlify \"/\". This hexlified string is used in `file:///' URLs." | ||
| 54 | (let* ((url-unreserved-chars (cons ?/ url-unreserved-chars))) | ||
| 55 | (url-hexify-string tramp-archive-test-file-archive))) | ||
| 56 | |||
| 51 | (defconst tramp-archive-test-archive | 57 | (defconst tramp-archive-test-archive |
| 52 | (file-name-as-directory tramp-archive-test-file-archive) | 58 | (file-name-as-directory tramp-archive-test-file-archive) |
| 53 | "The test archive.") | 59 | "The test archive.") |
| @@ -174,7 +180,8 @@ variables, so we check the Emacs version directly." | |||
| 174 | (should | 180 | (should |
| 175 | (string-equal | 181 | (string-equal |
| 176 | host | 182 | host |
| 177 | (url-hexify-string (concat "file://" tramp-archive-test-file-archive)))) | 183 | (url-hexify-string |
| 184 | (concat "file://" (tramp-archive-test-file-archive-hexlified))))) | ||
| 178 | (should-not port) | 185 | (should-not port) |
| 179 | (should (string-equal localname "/")) | 186 | (should (string-equal localname "/")) |
| 180 | (should (string-equal archive tramp-archive-test-file-archive))) | 187 | (should (string-equal archive tramp-archive-test-file-archive))) |
| @@ -193,7 +200,8 @@ variables, so we check the Emacs version directly." | |||
| 193 | (should | 200 | (should |
| 194 | (string-equal | 201 | (string-equal |
| 195 | host | 202 | host |
| 196 | (url-hexify-string (concat "file://" tramp-archive-test-file-archive)))) | 203 | (url-hexify-string |
| 204 | (concat "file://" (tramp-archive-test-file-archive-hexlified))))) | ||
| 197 | (should-not port) | 205 | (should-not port) |
| 198 | (should (string-equal localname "/foo")) | 206 | (should (string-equal localname "/foo")) |
| 199 | (should (string-equal archive tramp-archive-test-file-archive))) | 207 | (should (string-equal archive tramp-archive-test-file-archive))) |
| @@ -237,7 +245,8 @@ variables, so we check the Emacs version directly." | |||
| 237 | ;; archive boundaries. So we must cut the | 245 | ;; archive boundaries. So we must cut the |
| 238 | ;; trailing slash ourselves. | 246 | ;; trailing slash ourselves. |
| 239 | (substring | 247 | (substring |
| 240 | (file-name-directory tramp-archive-test-file-archive) | 248 | (file-name-directory |
| 249 | (tramp-archive-test-file-archive-hexlified)) | ||
| 241 | 0 -1))) | 250 | 0 -1))) |
| 242 | nil "/")) | 251 | nil "/")) |
| 243 | (file-name-nondirectory tramp-archive-test-file-archive))))) | 252 | (file-name-nondirectory tramp-archive-test-file-archive))))) |