branch: elpa/pg
commit bfe64dd493205a468d241217d37784a878a5e181
Author: Eric Marsden <[email protected]>
Commit: Eric Marsden <[email protected]>

    Tests: add test for the parsing of _date objects.
---
 test/test-pg.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/test/test-pg.el b/test/test-pg.el
index 56f7168777b..c55301cb38b 100755
--- a/test/test-pg.el
+++ b/test/test-pg.el
@@ -1262,7 +1262,12 @@ bar$$"))))
       (should (equal (scalar "select '05:00'::time") "05:00:00"))
       (should (equal (scalar "SELECT '04:15:31.445+05'::timetz") 
"04:15:31.445+05"))
       (should (equal (scalar "SELECT '2001-02-03 04:05:06'::timestamp")
-                     (encode-time (list 6 5 4 3 2 2001 nil -1 nil)))))))
+                     (encode-time (list 6 5 4 3 2 2001 nil -1 nil))))
+      (should (equal (scalar "SELECT 
'{2022-10-01,2020-05-06,1975-02-15}'::date[]")
+                     (vector (encode-time (list 0 0 0 1 10 2022))
+                             (encode-time (list 0 0 0 6 5 2020))
+                             (encode-time (list 0 0 0 15 2 1975))))))))
+
 
 (defun pg-test-numeric (con)
   (cl-flet ((scalar (sql) (car (pg-result (pg-exec con sql) :tuple 0))))
@@ -2546,6 +2551,7 @@ bar$$"))))
     (should (string= (car (pg-result res :tuple 0)) "Foobles")))
   (pg-exec con "DROP TABLE pgeltestr"))
 
+
 ;; Test our support for handling ParameterStatus messages, via the 
pg-parameter-change-functions
 ;; variable. When we change the session timezone, the backend should send us a 
ParameterStatus
 ;; message with TimeZone=<new-value>.

Reply via email to