emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/compat 55dbac40bf 3/8: Add trivial tests


From: ELPA Syncer
Subject: [elpa] externals/compat 55dbac40bf 3/8: Add trivial tests
Date: Wed, 4 Jan 2023 14:57:25 -0500 (EST)

branch: externals/compat
commit 55dbac40bfcef13a5622dbaa6beeb0b75b1a9ed6
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Add trivial tests
---
 compat-tests.el | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/compat-tests.el b/compat-tests.el
index c4065fc521..b2c371138d 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -726,7 +726,7 @@
   (should-equal (expand-file-name "bar/.#b") (make-lock-file-name "bar/b"))
   (should-equal (expand-file-name "bar/.#foo") (make-lock-file-name 
"bar/foo")))
 
-(ert-deftest file-attributes ()
+(ert-deftest file-attribute-getters ()
   (let ((attrs '(type link-number user-id group-id access-time 
modification-time
                  status-change-time size modes unspecified inode-number 
device-number)))
     (should-equal (file-attribute-type attrs) 'type)
@@ -1686,6 +1686,18 @@
   (should-not (time-equal-p '(1 2 3 4) '(2 2 3 4)))
   (should-not (time-equal-p '(2 2 3 4) '(1 2 3 4))))
 
+(ert-deftest decoded-time-getters ()
+  (let ((time '(second minute hour day month year weekday dst zone)))
+    (should-equal (decode-time-second time) 'second)
+    (should-equal (decode-time-minute time) 'minute)
+    (should-equal (decode-time-hour time) 'hour)
+    (should-equal (decode-time-day time) 'day)
+    (should-equal (decode-time-month time) 'month)
+    (should-equal (decode-time-year time) 'year)
+    (should-equal (decode-time-weekday time) 'weekday)
+    (should-equal (decode-time-dst time) 'dst)
+    (should-equal (decode-time-zone time) 'zone)))
+
 (ert-deftest decoded-time-period ()
   (should-equal 0 (decoded-time-period '()))
   (should-equal 0 (decoded-time-period '(0)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]