branch: externals/compat
commit bc77eeca579fca44f02b06da02196bbb5ae866c8
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
compat-31: Fix seconds-to-string
---
compat-31.el | 2 +-
compat-tests.el | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/compat-31.el b/compat-31.el
index 2b61749d794..bf9c476ed55 100644
--- a/compat-31.el
+++ b/compat-31.el
@@ -212,7 +212,7 @@ seconds per UNIT.")
:extended t
(cond
((< delay 0)
- (concat "-" (seconds-to-string (- delay) readable precision)))
+ (concat "-" (compat--seconds-to-string (- delay) readable precision)))
(readable
(let* ((stsa seconds-to-string-readable)
(expanded (eq readable 'expanded))
diff --git a/compat-tests.el b/compat-tests.el
index 157130afd49..69e4221a872 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -2835,6 +2835,7 @@
(should-equal (compat-call seconds-to-string 99999999) "3.17y")
(should-equal (compat-call seconds-to-string 999999999) "31.69y")
;; New functionality
+ (should-equal (compat-call seconds-to-string -1 'readable) "-1 second")
(should-equal (compat-call seconds-to-string 999 'readable) "17 minutes")
(should-equal (compat-call seconds-to-string 999 'readable 'abbrev) "17m")
(should-equal (compat-call seconds-to-string 999 'readable 'abbrev 2)
"16.65m")