diff options
Diffstat (limited to 'tests/test-wttrin--mode-line-update-display.el')
| -rw-r--r-- | tests/test-wttrin--mode-line-update-display.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test-wttrin--mode-line-update-display.el b/tests/test-wttrin--mode-line-update-display.el index e23780b..81fbded 100644 --- a/tests/test-wttrin--mode-line-update-display.el +++ b/tests/test-wttrin--mode-line-update-display.el @@ -146,7 +146,8 @@ (cl-letf (((symbol-function 'float-time) (lambda () 1300.0))) (setq wttrin--mode-line-cache (cons 1000.0 "Paris: ☀️ +61°F Clear")) (wttrin--mode-line-update-display) - (let ((tooltip (get-text-property 0 'help-echo wttrin-mode-line-string))) + (let* ((help-echo-fn (get-text-property 0 'help-echo wttrin-mode-line-string)) + (tooltip (funcall help-echo-fn nil nil nil))) (should (string-match-p "Paris" tooltip)) (should (string-match-p "Updated 5 minutes ago" tooltip)))) (test-wttrin--mode-line-update-display-teardown))) @@ -162,7 +163,8 @@ ;; Data is 2000 seconds old, threshold is 2*900=1800 -> stale (setq wttrin--mode-line-cache (cons 1000.0 "Paris: ☀️ +61°F Clear")) (wttrin--mode-line-update-display) - (let ((tooltip (get-text-property 0 'help-echo wttrin-mode-line-string))) + (let* ((help-echo-fn (get-text-property 0 'help-echo wttrin-mode-line-string)) + (tooltip (funcall help-echo-fn nil nil nil))) (should (string-match-p "Stale" tooltip)) (should (string-match-p "fetch failed" tooltip))))) (test-wttrin--mode-line-update-display-teardown))) |
