[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 7997888996: New test ffap-replace-file-component
From: |
Stefan Kangas |
Subject: |
master 7997888996: New test ffap-replace-file-component |
Date: |
Thu, 28 Jul 2022 04:44:03 -0400 (EDT) |
branch: master
commit 799788899628a9b34fa5d1c297d3678de0622323
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
New test ffap-replace-file-component
* test/lisp/ffap-tests.el (ffap-replace-file-component): New test.
---
lisp/ffap.el | 1 -
test/lisp/ffap-tests.el | 5 +++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/ffap.el b/lisp/ffap.el
index 169c64a395..dc286db130 100644
--- a/lisp/ffap.el
+++ b/lisp/ffap.el
@@ -492,7 +492,6 @@ Returned values:
(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."
diff --git a/test/lisp/ffap-tests.el b/test/lisp/ffap-tests.el
index 4b580b5af5..a11af9507e 100644
--- a/test/lisp/ffap-tests.el
+++ b/test/lisp/ffap-tests.el
@@ -28,6 +28,11 @@
(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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 7997888996: New test ffap-replace-file-component,
Stefan Kangas <=