diff options
| author | Lars Ingebrigtsen | 2021-07-24 18:48:44 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2021-07-24 18:53:43 +0200 |
| commit | 42d4537ed2cae41c969f59b413b4b9adae6dbc9b (patch) | |
| tree | c583fa8f3d916fdf1b91841239a6520247691046 /test/src | |
| parent | 0c77d1d2ca9a20d4b77a1228ee8f6e9aac64063a (diff) | |
| download | emacs-42d4537ed2cae41c969f59b413b4b9adae6dbc9b.tar.gz emacs-42d4537ed2cae41c969f59b413b4b9adae6dbc9b.zip | |
Really convert to multibyte in Fdirectory_append
* src/fileio.c (Fdirectory_append): Fix check for whether we need
to convert to multibyte.
(Fdirectory_append):
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/fileio-tests.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/src/fileio-tests.el b/test/src/fileio-tests.el index 702659fa395..73a7775279a 100644 --- a/test/src/fileio-tests.el +++ b/test/src/fileio-tests.el | |||
| @@ -170,6 +170,11 @@ Also check that an encoding error can appear in a symlink." | |||
| 170 | (should (equal (directory-append "fóo" "bar") "fóo/bar")) | 170 | (should (equal (directory-append "fóo" "bar") "fóo/bar")) |
| 171 | (should (equal (directory-append "foo" "bár") "foo/bár")) | 171 | (should (equal (directory-append "foo" "bár") "foo/bár")) |
| 172 | (should (equal (directory-append "fóo" "bár") "fóo/bár")) | 172 | (should (equal (directory-append "fóo" "bár") "fóo/bár")) |
| 173 | (let ((string (make-string 5 ?a))) | ||
| 174 | (should (not (multibyte-string-p string))) | ||
| 175 | (aset string 2 255) | ||
| 176 | (should (not (multibyte-string-p string))) | ||
| 177 | (should (equal (directory-append "fóo" string) "fóo/aa\377aa"))) | ||
| 173 | (should-error (directory-append "foo" "")) | 178 | (should-error (directory-append "foo" "")) |
| 174 | (should-error (directory-append "" "bar")) | 179 | (should-error (directory-append "" "bar")) |
| 175 | (should-error (directory-append "" ""))) | 180 | (should-error (directory-append "" ""))) |