Index: /trunk/glueforge/glueforge.in
===================================================================
--- /trunk/glueforge/glueforge.in	(revision 4148)
+++ /trunk/glueforge/glueforge.in	(revision 4149)
@@ -3,5 +3,5 @@
 # Copyright (C) 2005  Joshua Hoblitt
 #
-# $Id: glueforge.in,v 1.16 2005-06-08 03:38:37 jhoblitt Exp $
+# $Id: glueforge.in,v 1.17 2005-06-08 04:04:34 jhoblitt Exp $
 
 use strict;
@@ -99,4 +99,5 @@
     'droptable_c.tt'        => "$output/tests/droptable.c",
     'insert_c.tt'           => "$output/tests/insert.c",
+    'insertobject_c.tt'     => "$output/tests/insertobject.c",
     'popobject_c.tt'        => "$output/tests/popobject.c",
 );
Index: /trunk/glueforge/templates/psdb/insertobject_at.tt
===================================================================
--- /trunk/glueforge/templates/psdb/insertobject_at.tt	(revision 4149)
+++ /trunk/glueforge/templates/psdb/insertobject_at.tt	(revision 4149)
@@ -0,0 +1,8 @@
+AT_SETUP([[% namespace %]InsertObject() - Insert a single [% object_name %] object into a table])
+AT_KEYWORDS([[% namespace %]InsertObject])
+
+AT_CHECK([dbsetup])
+AT_CHECK([insertobject])
+AT_CHECK([dbcleanup])
+
+AT_CLEANUP
Index: /trunk/glueforge/templates/psdb/insertobject_c.tt
===================================================================
--- /trunk/glueforge/templates/psdb/insertobject_c.tt	(revision 4149)
+++ /trunk/glueforge/templates/psdb/insertobject_c.tt	(revision 4149)
@@ -0,0 +1,35 @@
+[% USE format -%]
+[% indented = format('%-15s %s') -%]
+#include <pslib.h>
+#include <[% pkg_name %].h>
+#include <stdlib.h>
+
+int main () {
+    psDB            *dbh;
+    bool            status;
+    [% indented(object_name, "*object") %];
+
+    dbh = psDBInit("localhost", "test", NULL, "test");
+    if (!dbh) {
+        exit(EXIT_FAILURE);
+    }
+
+    object = [% object_name %]Alloc(
+[%- SET i = 0 -%]
+[%- FOREACH item = columns -%]
+    [%- IF i == 0 -%][%- i = 1 -%][%- ELSE -%], [% END -%] [%- item.test -%]
+[%- END -%]
+);
+    if (!object) {
+        exit(EXIT_FAILURE);
+    }
+
+    status = [% namespace %]InsertObject(dbh, object);
+    if (!status) {
+        exit(EXIT_FAILURE);
+    }
+
+    psDBCleanup(dbh);
+
+    exit(EXIT_SUCCESS);
+}
Index: /trunk/glueforge/templates/psdb/tests_makefile_am.tt
===================================================================
--- /trunk/glueforge/templates/psdb/tests_makefile_am.tt	(revision 4148)
+++ /trunk/glueforge/templates/psdb/tests_makefile_am.tt	(revision 4149)
@@ -57,4 +57,5 @@
     droptable \
     insert \
+    insertobject \
     popobject
 
Index: /trunk/glueforge/templates/psdb/testsuite_at.tt
===================================================================
--- /trunk/glueforge/templates/psdb/testsuite_at.tt	(revision 4148)
+++ /trunk/glueforge/templates/psdb/testsuite_at.tt	(revision 4149)
@@ -17,3 +17,5 @@
 [% INCLUDE insert_at.tt %]
 
+[% INCLUDE insertobject_at.tt %]
+
 [% INCLUDE popobject_at.tt %]
