Eli Zaretskii writes: >> From: Daniel Martín >> 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.