From: Stefan Kangas Date: Wed, 21 Oct 2020 15:21:46 +0000 (+0200) Subject: Tweak two time.el tests X-Git-Tag: emacs-28.0.90~5501 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ffbea0d705a278b3c268b7cd44ed0484be8b89c1;p=emacs.git Tweak two time.el tests * test/lisp/time-tests.el (time-tests-display-time-update--load) (time-tests-display-time-update): Tweak tests. --- diff --git a/test/lisp/time-tests.el b/test/lisp/time-tests.el index efb3f491468..1a62450cb3a 100644 --- a/test/lisp/time-tests.el +++ b/test/lisp/time-tests.el @@ -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) "")))) @@ -43,9 +45,11 @@ (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 ()