From ffbea0d705a278b3c268b7cd44ed0484be8b89c1 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 21 Oct 2020 17:21:46 +0200 Subject: [PATCH] Tweak two time.el tests * test/lisp/time-tests.el (time-tests-display-time-update--load) (time-tests-display-time-update): Tweak tests. --- test/lisp/time-tests.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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 () -- 2.39.2