Add tests for NTP time conversion

This commit is contained in:
Daniel - 2020-01-11 10:13:30 +01:00
parent a63210a336
commit f4b55ad777
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
2 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1,18 @@
;;; db-utils-test.el -- Tests for db-utils -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
(require 'ert)
(require 'db-utils)
(require 'cl-lib)
(ert-deftest db-utils-db/ntp-to-time ()
"Test NTP conversion to readable time with `db/ntp-to-time'."
(should (equal (db/ntp-to-time #xdcd2ac0c #x05c6dbac)
"2017-05-26T13:28:44.022565583Z"))
(should (equal (db/ntp-to-time #xbd5927ee #xbc616000)
"2000-08-31T18:52:30.735860824Z")))
;;; db-utils-test.el ends here

View File

@ -227,8 +227,6 @@ FORMAT-STRING defaults to some ISO 8601-like format."
(list h l u p)
t))))
;; XXX: add test: dcd2ac0c 05c6dbac is 2017-06-26T13:28:44.022565583Z
(defun conditionally-enable-lispy ()
"Enable lispy-mode when in `eval-expression or in
`pp-eval-expression. lispy must have been loaded for this