Skip to content

Commit

Permalink
Support space and backslash characters in runfile filenames.
Browse files Browse the repository at this point in the history
Bazel supports them with bazelbuild/bazel#23331.

Step 1: support them for directory-based runfiles.  This doesn’t require any
code changes, just adapt the test.
  • Loading branch information
phst committed Oct 7, 2024
1 parent 9d62df1 commit 32030fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions elisp/runfiles/runfiles-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -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))))

Expand Down

0 comments on commit 32030fb

Please sign in to comment.