[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat e37ef6fd63 07/11: Fix tests
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat e37ef6fd63 07/11: Fix tests |
Date: |
Wed, 4 Jan 2023 08:57:27 -0500 (EST) |
branch: externals/compat
commit e37ef6fd63aae9109299262093b5d7c27badf5d4
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Fix tests
---
compat-tests.el | 34 ++++++++++++++--------------
compat.texi | 70 ++++++++++++++++++++++++++++-----------------------------
2 files changed, 52 insertions(+), 52 deletions(-)
diff --git a/compat-tests.el b/compat-tests.el
index f921b6a55e..bfe409b1a2 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -174,29 +174,29 @@
(should (equal ":/bar/foo" (file-local-name "/ssh:::/bar/foo"))))
(ert-deftest file-name-quoted-p ()
- (should (equal nil (file-name-quoted-p "")))
- (should (equal t (file-name-quoted-p "/:")))
- (should (equal nil (file-name-quoted-p "//:")))
- (should (equal t (file-name-quoted-p "/::")))
- (should (equal nil (file-name-quoted-p "/ssh::")))
- (should (equal nil (file-name-quoted-p "/ssh::a")))
- (should (equal t (file-name-quoted-p "/ssh::/:a")))
+ (should (equal nil (compat-call file-name-quoted-p "")))
+ (should (equal t (compat-call file-name-quoted-p "/:")))
+ (should (equal nil (compat-call file-name-quoted-p "//:")))
+ (should (equal t (compat-call file-name-quoted-p "/::")))
+ (should (equal nil (compat-call file-name-quoted-p "/ssh::")))
+ (should (equal nil (compat-call file-name-quoted-p "/ssh::a")))
+ (should (equal t (compat-call file-name-quoted-p "/ssh::/:a")))
;; These tests fails prior to Emacs 26, because /ssh:foo was a valid
;; TRAMP path back then.
;;
- ;; (should (equal nil "/ssh:/:a")
+ ;; (should (equal nil (compat-call file-name-quoted-p "/ssh:/:a")))
)
(ert-deftest file-name-quote ()
- (should (equal "/:" (file-name-quote "")))
- (should (equal "/::"(file-name-quote ":")))
- (should (equal "/:/" (file-name-quote "/")))
- (should (equal "/:" (file-name-quote "/:")))
- (should (equal "/:a" (file-name-quote "a")))
- (should (equal "/::a" (file-name-quote ":a")))
- (should (equal "/:/a" (file-name-quote "/a")))
- (should (equal "/:a" (file-name-quote "/:a")))
- (should (equal (concat "/ssh:" (system-name) ":/:a") (file-name-quote
"/ssh::a"))))
+ (should (equal "/:" (compat-call file-name-quote "")))
+ (should (equal "/::"(compat-call file-name-quote ":")))
+ (should (equal "/:/" (compat-call file-name-quote "/")))
+ (should (equal "/:" (compat-call file-name-quote "/:")))
+ (should (equal "/:a" (compat-call file-name-quote "a")))
+ (should (equal "/::a" (compat-call file-name-quote ":a")))
+ (should (equal "/:/a" (compat-call file-name-quote "/a")))
+ (should (equal "/:a" (compat-call file-name-quote "/:a")))
+ (should (equal (concat "/ssh:" (system-name) ":/:a") (compat-call
file-name-quote "/ssh::a"))))
(ert-deftest file-name-with-extension ()
(should (equal "file.ext" (file-name-with-extension "file" "ext")))
diff --git a/compat.texi b/compat.texi
index 6f85e54832..1f96cd0a96 100644
--- a/compat.texi
+++ b/compat.texi
@@ -914,41 +914,6 @@ Processes,,,elisp}), and as the program to run on the
remote host. If
@xref{Magic File Names,,,elisp}.
@end defun
-@c copied from lispref/files.texi
-@defmac file-name-quoted-p name
-This macro returns non-@code{nil}, when @var{name} is quoted with the
-prefix @samp{/:}. If @var{name} is a remote file name, the local part
-of @var{name} is checked.
-
-@xref{File Name Expansion,,,elisp}.
-@end defmac
-
-@c copied from lispref/files.texi
-@defmac file-name-quote name
-This macro adds the quotation prefix @samp{/:} to the file @var{name}.
-For a local file @var{name}, it prefixes @var{name} with @samp{/:}. If
-@var{name} is a remote file name, the local part of @var{name}
-(@pxref{Magic File Names,,,elisp}) is quoted. If @var{name} is already
-a quoted file name, @var{name} is returned unchanged.
-
-@example
-@group
-(substitute-in-file-name (file-name-quote "bar/~/foo")) @result{}
- "/:bar/~/foo"
-@end group
-
-@group
-(substitute-in-file-name (file-name-quote "/ssh:host:bar/~/foo"))
- @result{} "/ssh:host:/:bar/~/foo"
-@end group
-@end example
-
-The macro cannot be used to suppress file name handlers from magic file
-names (@pxref{Magic File Names,,,elisp}).
-
-@xref{File Name Expansion,,,elisp}.
-@end defmac
-
@defun read-multiple-choice prompt choices &optional help-string show-help
long-form
Ask user a multiple choice question. @var{prompt} should be a string
that will be displayed as the prompt.
@@ -1144,6 +1109,41 @@ The compatibility version handles the optional arguments
@var{trim-left}
and @var{trim-right}.
@end defun
+@c copied from lispref/files.texi
+@defun compat-call@ file-name-quoted-p name
+This macro returns non-@code{nil}, when @var{name} is quoted with the
+prefix @samp{/:}. If @var{name} is a remote file name, the local part
+of @var{name} is checked.
+
+@xref{File Name Expansion,,,elisp}.
+@end defun
+
+@c copied from lispref/files.texi
+@defun compat-call@ file-name-quote name
+This macro adds the quotation prefix @samp{/:} to the file @var{name}.
+For a local file @var{name}, it prefixes @var{name} with @samp{/:}. If
+@var{name} is a remote file name, the local part of @var{name}
+(@pxref{Magic File Names,,,elisp}) is quoted. If @var{name} is already
+a quoted file name, @var{name} is returned unchanged.
+
+@example
+@group
+(substitute-in-file-name (compat-call file-name-quote "bar/~/foo")) @result{}
+ "/:bar/~/foo"
+@end group
+
+@group
+(substitute-in-file-name (compat-call file-name-quote "/ssh:host:bar/~/foo"))
+ @result{} "/ssh:host:/:bar/~/foo"
+@end group
+@end example
+
+The macro cannot be used to suppress file name handlers from magic file
+names (@pxref{Magic File Names,,,elisp}).
+
+@xref{File Name Expansion,,,elisp}.
+@end defun
+
@subsection Missing Definitions
Compat does not provide support for the following Lisp features
implemented in 26.1:
- [elpa] externals/compat updated (0bb4709d83 -> bf5b987481), ELPA Syncer, 2023/01/04
- [elpa] externals/compat 50acbf0833 05/11: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat b3a2e5aff2 06/11: tests: Remove docstrings, ELPA Syncer, 2023/01/04
- [elpa] externals/compat e37ef6fd63 07/11: Fix tests,
ELPA Syncer <=
- [elpa] externals/compat 5305c83a97 10/11: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat bf5b987481 11/11: Fix test, ELPA Syncer, 2023/01/04
- [elpa] externals/compat d9b6cb80ef 09/11: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 3aa0b680d3 01/11: Work on tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 820c4cd7ac 03/11: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 7c93ca1493 02/11: Test compiled compat, ELPA Syncer, 2023/01/04
- [elpa] externals/compat 38cfab4677 04/11: Restore tests, ELPA Syncer, 2023/01/04
- [elpa] externals/compat c8d1447114 08/11: Simplify tests, ELPA Syncer, 2023/01/04