GNU bug report logs -
#51754
29.0.50; [PATCH] tramp-compat-file-name-concat work in wrong way
Previous Next
Reported by: Aleksandr Vityazev <avityazev <at> posteo.org>
Date: Wed, 10 Nov 2021 18:57:01 UTC
Severity: normal
Tags: patch
Found in version 29.0.50
Fixed in version 28.1
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51754 in the body.
You can then email your comments to 51754 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#51754
; Package
emacs
.
(Wed, 10 Nov 2021 18:57:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Aleksandr Vityazev <avityazev <at> posteo.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 10 Nov 2021 18:57:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
The current implementation of the tramp-compat-file-name-concat
from lisp/net/tramp-compat.el fails test fileio-tests/file-name-concat
from file test/src/fileio-tests.el for file-name-concat on Emacs where no
file-name-concat.
#+begin_src elisp
(ert-deftest test-tramp-compat-file-name-concat ()
(should (equal (tramp-compat-file-name-concat "foo" "bar") "foo/bar"))
(should (equal (tramp-compat-file-name-concat "foo" "bar") "foo/bar"))
(should (equal (tramp-compat-file-name-concat "foo" "bar" "zot") "foo/bar/zot"))
(should (equal (tramp-compat-file-name-concat "foo/" "bar") "foo/bar"))
(should (equal (tramp-compat-file-name-concat "foo//" "bar") "foo//bar"))
(should (equal (tramp-compat-file-name-concat "foo/" "bar/" "zot") "foo/bar/zot"))
(should (equal (tramp-compat-file-name-concat "fóo" "bar") "fóo/bar"))
(should (equal (tramp-compat-file-name-concat "foo" "bár") "foo/bár"))
(should (equal (tramp-compat-file-name-concat "fóo" "bár") "fóo/bár"))
(let ((string (make-string 5 ?a)))
(should (not (multibyte-string-p string)))
(aset string 2 255)
(should (not (multibyte-string-p string)))
(should (equal (tramp-compat-file-name-concat "fóo" string) "fóo/aa\377aa")))
(should (equal (tramp-compat-file-name-concat "foo") "foo"))
(should (equal (tramp-compat-file-name-concat "foo/") "foo/"))
(should (equal (tramp-compat-file-name-concat "foo" "") "foo"))
(should (equal (tramp-compat-file-name-concat "foo" "" "" "" nil) "foo"))
(should (equal (tramp-compat-file-name-concat "" "bar") "bar"))
(should (equal (tramp-compat-file-name-concat "" "") "")))
(ert 'test-tramp-compat-file-name-concat)
#+end_src
[test-tramp-compat-file-name-concat.ert (text/plain, inline)]
Selector: test-tramp-compat-file-name-concat
Passed: 0
Failed: 1 (1 unexpected)
Skipped: 0
Total: 1/1
Started at: 2021-11-10 21:21:24+0300
Finished.
Finished at: 2021-11-10 21:21:25+0300
F
F test-tramp-compat-file-name-concat
(wrong-type-argument characterp "zot")
[Message part 3 (text/plain, inline)]
Here is the patch to fix:
[0001-lisp-net-tramp-compat.el-Fix-tramp-compat-file-name-.patch (text/x-patch, attachment)]
[Message part 5 (text/plain, inline)]
--
Best regards,
Aleksandr Vityazev
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Thu, 11 Nov 2021 11:00:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Aleksandr Vityazev <avityazev <at> posteo.org>
:
bug acknowledged by developer.
(Thu, 11 Nov 2021 11:00:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 51754-done <at> debbugs.gnu.org (full text, mbox):
Version: 28.1
Aleksandr Vityazev <avityazev <at> posteo.org> writes:
> Hello,
Hi Aleksandr,
> The current implementation of the tramp-compat-file-name-concat
> from lisp/net/tramp-compat.el fails test fileio-tests/file-name-concat
> from file test/src/fileio-tests.el for file-name-concat on Emacs where no
> file-name-concat.
Thanks for the report. I've applied your patch to the emacs-28 branch,
and merged this to the master branch. Closing the bug.
Best regards, Michael.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 09 Dec 2021 12:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 100 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.