branch: externals/compat
commit 919f25d642967e65b1dd66ce6a0986607958ab83
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Restore test
---
compat-tests.el | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/compat-tests.el b/compat-tests.el
index 72f31472c4..e35fc45081 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -443,6 +443,20 @@
(should-equal t (always 1)) ;; single argument
(should-equal t (always 1 2 3 4))) ;; multiple arguments
+(ert-deftest directory-name-p ()
+ (should (directory-name-p "/"))
+ (should-not (directory-name-p "/file"))
+ (should-not (directory-name-p "/dir/file"))
+ (should (directory-name-p "/dir/"))
+ (should-not (directory-name-p "/dir"))
+ (should (directory-name-p "/dir/subdir/"))
+ (should-not (directory-name-p "/dir/subdir"))
+ (should (directory-name-p "dir/"))
+ (should-not (directory-name-p "file"))
+ (should-not (directory-name-p "dir/file"))
+ (should (directory-name-p "dir/subdir/"))
+ (should-not (directory-name-p "dir/subdir")))
+
(ert-deftest file-size-human-readable ()
(should-equal "1000" (compat-call file-size-human-readable 1000))
(should-equal "1k" (compat-call file-size-human-readable 1024))
@@ -1299,20 +1313,6 @@
;; ;; (compat-sort (directory-files-recursively "."
"make\\|copying") #'string<)
;; ;; '("./.github/workflows/makefile.yml" "./COPYING"
"./Makefile"))))
-;; (ert-deftest directory-name-p
-;; (should-equal t "/")
-;; (should-equal nil "/file")
-;; (should-equal nil "/dir/file")
-;; (should-equal t "/dir/")
-;; (should-equal nil "/dir")
-;; (should-equal t "/dir/subdir/")
-;; (should-equal nil "/dir/subdir")
-;; (should-equal t "dir/")
-;; (should-equal nil "file")
-;; (should-equal nil "dir/file")
-;; (should-equal t "dir/subdir/")
-;; (should-equal nil "dir/subdir"))
-
;; (ert-deftest if-let* ()
;; (should
;; (compat--t-if-let*