]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak two time.el tests
authorStefan Kangas <stefan@marxist.se>
Wed, 21 Oct 2020 15:21:46 +0000 (17:21 +0200)
committerStefan Kangas <stefan@marxist.se>
Wed, 21 Oct 2020 15:22:17 +0000 (17:22 +0200)
* test/lisp/time-tests.el (time-tests-display-time-update--load)
(time-tests-display-time-update): Tweak tests.

test/lisp/time-tests.el

index efb3f491468f1d2e838f7446418dd451cea68927..1a62450cb3af3478996986e7a3ee5eb6f1c567e3 100644 (file)
@@ -33,7 +33,9 @@
   (let ((display-time-load-average 1)
         (display-time-load-average-threshold 0))
     (display-time-next-load-average)
-    (should (string-match (rx string-start " " (+ digit "."))
+    (should (string-match (rx string-start " "
+                              (+ (| digit "."))
+                              string-end)
                           (display-time-update--load))))
   (let (display-time-load-average)
     (should (equal (display-time-update--load) ""))))
         (display-time-load-average-threshold 0)
         display-time-string)
     (display-time-update)
-    (should (string-match (rx string-start (? digit) digit ":" digit digit
+    (should (string-match (rx string-start
+                              (? digit) digit ":" digit digit
                               (? (| "AM" "PM"))
-                              " " (+ digit "."))
+                              " " (+ (| digit "."))
+                              string-end)
                           display-time-string))))
 
 (ert-deftest time-tests-display-time-file-nonempty-p ()