From 32030fb6f25986cbbf187c220af42c248bc9c932 Mon Sep 17 00:00:00 2001
From: Philipp Stephani
Date: Tue, 8 Oct 2024 01:58:41 +0200
Subject: [PATCH] Support space and backslash characters in runfile filenames.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Bazel supports them with https://github.com/bazelbuild/bazel/pull/23331.
Step 1: support them for directory-based runfiles. This doesn’t require any
code changes, just adapt the test.
---
elisp/runfiles/runfiles-test.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/elisp/runfiles/runfiles-test.el b/elisp/runfiles/runfiles-test.el
index 0d1d24ab..f506d9ad 100644
--- a/elisp/runfiles/runfiles-test.el
+++ b/elisp/runfiles/runfiles-test.el
@@ -39,14 +39,15 @@
(ert-deftest elisp/runfiles/special-chars/directory ()
(let ((directory (make-temp-file "runfiles-test-" :directory)))
(unwind-protect
- (let ((filename (expand-file-name "testäα𝐴🐈'.txt" directory))
+ (let ((filename (expand-file-name "testäα𝐴🐈' \t\n\\.txt" directory))
(runfiles (elisp/runfiles/make :manifest "/invalid.manifest"
:directory directory))
(coding-system-for-write 'utf-8-unix)
(write-region-annotate-functions nil)
(write-region-post-annotation-function nil))
(write-region "contents\n" nil filename nil nil nil 'excl)
- (should (equal (elisp/runfiles/rlocation "testäα𝐴🐈'.txt" runfiles)
+ (should (equal (elisp/runfiles/rlocation "testäα𝐴🐈' \t\n\\.txt"
+ runfiles)
filename)))
(delete-directory directory :recursive))))