* test/lisp/ffap-tests.el (ffap-replace-file-component): New test.
(and (stringp fullname)
(stringp name)
(concat (file-remote-p fullname) name)))
-;; (ffap-replace-file-component "/who@foo.com:/whatever" "/new")
(defun ffap-file-suffix (file)
"Return trailing `.foo' suffix of FILE, or nil if none."
(require 'ert-x)
(require 'ffap)
+(ert-deftest ffap-replace-file-component ()
+ (should (equal
+ (ffap-replace-file-component "/ftp:who@foo.com:/whatever" "/new")
+ "/ftp:who@foo.com:/new")))
+
(ert-deftest ffap-tests-25243 ()
"Test for https://debbugs.gnu.org/25243 ."
(ert-with-temp-file file