diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/time-stamp-tests.el | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/lisp/time-stamp-tests.el b/test/lisp/time-stamp-tests.el index 92df1839350..ad2cb0ead7f 100644 --- a/test/lisp/time-stamp-tests.el +++ b/test/lisp/time-stamp-tests.el | |||
| @@ -57,6 +57,8 @@ | |||
| 57 | 57 | ||
| 58 | ;;; Tests: | 58 | ;;; Tests: |
| 59 | 59 | ||
| 60 | ;;; Tests of time-stamp-string formatting | ||
| 61 | |||
| 60 | (ert-deftest time-stamp-test-format-day-of-week () | 62 | (ert-deftest time-stamp-test-format-day-of-week () |
| 61 | "Test time-stamp formats for named day of week." | 63 | "Test time-stamp formats for named day of week." |
| 62 | (with-time-stamp-test-env | 64 | (with-time-stamp-test-env |
| @@ -360,4 +362,21 @@ | |||
| 360 | (should (equal (time-stamp-string "%#3a" ref-time3) "SUN")) | 362 | (should (equal (time-stamp-string "%#3a" ref-time3) "SUN")) |
| 361 | (should (equal (time-stamp-string "%#3b" ref-time2) "NOV")))) | 363 | (should (equal (time-stamp-string "%#3b" ref-time2) "NOV")))) |
| 362 | 364 | ||
| 365 | ;;; Tests of helper functions | ||
| 366 | |||
| 367 | (ert-deftest time-stamp-test-helper-zone-type-p () | ||
| 368 | "Test time-stamp-zone-type-p." | ||
| 369 | (should (time-stamp-zone-type-p t)) | ||
| 370 | (should (time-stamp-zone-type-p nil)) | ||
| 371 | (should (time-stamp-zone-type-p 'wall)) | ||
| 372 | (should-not (time-stamp-zone-type-p 'floor)) | ||
| 373 | (should (time-stamp-zone-type-p "arbitrary string")) | ||
| 374 | (should (time-stamp-zone-type-p 0)) | ||
| 375 | (should-not (time-stamp-zone-type-p 3.14)) | ||
| 376 | (should-not (time-stamp-zone-type-p '(0))) | ||
| 377 | (should-not (time-stamp-zone-type-p '(0 . "A"))) | ||
| 378 | (should (time-stamp-zone-type-p '(0 "A"))) | ||
| 379 | (should-not (time-stamp-zone-type-p '(0 0))) | ||
| 380 | (should-not (time-stamp-zone-type-p '("A" "A")))) | ||
| 381 | |||
| 363 | ;;; time-stamp-tests.el ends here | 382 | ;;; time-stamp-tests.el ends here |