emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix some failing tests in BSD systems


From: Daniel Martín
Subject: Re: [PATCH] Fix some failing tests in BSD systems
Date: Sun, 03 Jan 2021 22:08:56 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (darwin)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Daniel Martín <mardani29@yahoo.es>
>> Date: Sun, 03 Jan 2021 18:16:46 +0100
>> 
>>  (ert-deftest xref--xref-file-name-display-is-abs ()
>> -  (let ((xref-file-name-display 'abs))
>> -    (should (equal (delete-dups
>> -                    (mapcar 'xref-location-group
>> -                            (xref-tests--locations-in-data-dir 
>> "\\(bar\\|foo\\)")))
>> -                   (list
>> -                    (concat xref-tests--data-dir "file1.txt")
>> -                    (concat xref-tests--data-dir "file2.txt"))))))
>> +  (let ((xref-file-name-display 'abs)
>> +        ;; BSD find may add an extra '/' to the path.
>> +        (expected (list
>> +                   (concat xref-tests--data-dir "/?file1.txt")
>> +                   (concat xref-tests--data-dir "/?file2.txt")))
>
> Why are we producing file names by concatenation, instead of calling
> expand-file-name?  Wouldn't using the latter solve the problem?  Or
> what did I miss?

Yes.  I've attached another solution in terms of expand-file-name and
file-relative-name.

Attachment: 0001-Fix-some-xref-tests-for-systems-with-BSD-find.patch
Description: Text Data


reply via email to

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