emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51754: closed (29.0.50; [PATCH] tramp-compat-file-name-concat work i


From: GNU bug Tracking System
Subject: bug#51754: closed (29.0.50; [PATCH] tramp-compat-file-name-concat work in wrong way)
Date: Thu, 11 Nov 2021 11:00:02 +0000

Your message dated Thu, 11 Nov 2021 11:59:28 +0100
with message-id <878rxvhsa7.fsf@gmx.de>
and subject line Re: bug#51754: 29.0.50; [PATCH] tramp-compat-file-name-concat 
work in wrong way
has caused the debbugs.gnu.org bug report #51754,
regarding 29.0.50; [PATCH] tramp-compat-file-name-concat work in wrong way
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
51754: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=51754
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 29.0.50; [PATCH] tramp-compat-file-name-concat work in wrong way Date: Wed, 10 Nov 2021 18:56:49 +0000
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

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")


Here is the patch to fix:

Attachment: 0001-lisp-net-tramp-compat.el-Fix-tramp-compat-file-name-.patch
Description: tramp-compat-file-name-concat


-- 
Best regards,
Aleksandr Vityazev

--- End Message ---
--- Begin Message --- Subject: Re: bug#51754: 29.0.50; [PATCH] tramp-compat-file-name-concat work in wrong way Date: Thu, 11 Nov 2021 11:59:28 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)
Version: 28.1

Aleksandr Vityazev <avityazev@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.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]