r10077: * multiple: Apply patch from Joerg Hoehle with multiple
[clsql.git] / tests / test-basic.lisp
index 516eeb23bcd46ba2c2981ceaef919ad70f7f39f6..24ef372fb63e7c8a583208a923c906c19a499ca2 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Author:  Kevin M. Rosenberg
 ;;;; Created: Mar 2002
 ;;;;
-;;;; $Id: tests.lisp 8926 2004-04-10 21:12:52Z kevin $
+;;;; $Id$
 ;;;;
 ;;;; This file, part of CLSQL, is Copyright (c) 2002-2004 by Kevin M. Rosenberg
 ;;;;
@@ -98,6 +98,7 @@
             results)))
       ((t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t)))
     
+   
     (deftest :basic/map/2
        (let ((results '())
              (rows (map-query 'list #'identity "select * from TYPE_TABLE" 
                 results)))
       ((t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t) (t 3 t t)))
 
+    ;; confirm that a query on a single element returns a list of one element
+    (deftest :basic/map/4
+       (let ((rows (map-query 'list #'identity "select t_int from TYPE_TABLE" 
+                              :result-types nil)))
+         (values
+          (consp (first rows))
+          (length (first rows))))
+      t 1)
+    
     (deftest :basic/do/1
        (let ((results '()))
          (do-query ((int float str) "select * from TYPE_TABLE" :result-types nil)