Index: trunk/psLib/test/dataIO/tst_psDB.c
===================================================================
--- trunk/psLib/test/dataIO/tst_psDB.c	(revision 3962)
+++ trunk/psLib/test/dataIO/tst_psDB.c	(revision 3963)
@@ -9,6 +9,6 @@
  *  @author Aaron Culliney, MHPCC
  *
- *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-05-18 23:22:02 $
+ *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-05-18 23:41:06 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -476,8 +476,9 @@
 psS32 TPDBSelectRows( void )
 {
+    int i;
     psS32 failed = 0;
     psDB *dbh = NULL;
     const char* table = "table5";
-    psArray *ary = NULL;
+    psArray *ary=NULL, *ary1=NULL, *ary2=NULL;
     psMetadata *where=NULL, *row=NULL, *md = _get_CreateTableMetadata();
     psMetadataItem *item = NULL;
@@ -507,25 +508,29 @@
         if (!failed) {
             where = _get_where();
-            ary = psDBSelectRows(dbh, table, /*NULL*/where, 0);
+            ary1 = psDBSelectRows(dbh, table, where, 0);
+            ary2 = psDBSelectRows(dbh, table, where, 1); /* specify limit */
             psFree(where);
-            if (ary == NULL) {
-                failed = 1;
-            } else {
-                row = (psMetadata*)psArrayGet(ary, 0);
-                _print_row(row);
-
-                item = psMetadataLookup(row, "key_s32");
-                if (item == NULL) {
-                    psLogMsg( __func__, PS_LOG_INFO, "oops, key_s32 not found!\n" );
-                    failed = 1;
-                } else if (item->data.S32 != S32_1) {
-                    psLogMsg( __func__, PS_LOG_INFO, "oops, did not find expected output (%d vs %d)!\n",
-                              item->data.S32,S32_1);
+            for (i=0; i<2; i++) {
+                ary = i ? ary2 : ary1;
+                if (ary == NULL) {
                     failed = 1;
                 } else {
-                    psLogMsg( __func__, PS_LOG_INFO, "found expected output.\n" );
+                    row = (psMetadata*)psArrayGet(ary, 0);
+                    _print_row(row);
+
+                    item = psMetadataLookup(row, "key_s32");
+                    if (item == NULL) {
+                        psLogMsg( __func__, PS_LOG_INFO, "oops, key_s32 not found!\n" );
+                        failed = 1;
+                    } else if (item->data.S32 != S32_1) {
+                        psLogMsg( __func__, PS_LOG_INFO, "oops, did not find expected output (%d vs %d)!\n",
+                                  item->data.S32,S32_1);
+                        failed = 1;
+                    } else {
+                        psLogMsg( __func__, PS_LOG_INFO, "found expected output.\n" );
+                    }
+
+                    psFree(ary);
                 }
-
-                psFree(ary);
             }
         }
