# HG changeset patch # User renatofilho # Date 1178892201 -3600 # Node ID 17877d6e44e2b5b6bbf12663d806e984fb2d8547 # Parent b937c837e9297b9a5a09822c6cc36b96acbffa7e [svn r651] fixed test program diff -r b937c837e929 -r 17877d6e44e2 libgnomevfs2-mythtv/tests/Makefile.am --- a/libgnomevfs2-mythtv/tests/Makefile.am Fri May 11 14:41:11 2007 +0100 +++ b/libgnomevfs2-mythtv/tests/Makefile.am Fri May 11 15:03:21 2007 +0100 @@ -4,12 +4,12 @@ test_SOURCES = \ main.c -INCLUDES = \ +AM_CPPFLAGS = \ $(GLIB_CFLAGS) \ $(GOBJECT_CFLAGS) \ $(GNOME_VFS_CFLAGS) -LDADD = \ +test_LDADD = \ $(GLIB_LIBS) \ $(GOBJECT_LIBS) \ $(GNOME_VFS_LIBS) diff -r b937c837e929 -r 17877d6e44e2 libgnomevfs2-mythtv/tests/main.c --- a/libgnomevfs2-mythtv/tests/main.c Fri May 11 14:41:11 2007 +0100 +++ b/libgnomevfs2-mythtv/tests/main.c Fri May 11 15:03:21 2007 +0100 @@ -1,6 +1,6 @@ - -#include -#include +#include +#include +#include #include static void @@ -12,14 +12,12 @@ } } - - int main (int argc, char** argv) { GnomeVFSResult result; GnomeVFSFileSize read; gchar buff[512]; - GnomeVFSHandle *handle; + GnomeVFSHandle *handle = NULL; g_assert (argc == 2); @@ -32,9 +30,12 @@ assert_message (result == GNOME_VFS_OK, gnome_vfs_result_to_string (result)); + g_debug ("handle %p", handle); + while (result == GNOME_VFS_OK) { memset (buff, '\0', sizeof (buff)); result = gnome_vfs_read (handle, buff, sizeof (buff), &read); + g_debug ("read %"G_GINT64_FORMAT, read); } assert_message (result == GNOME_VFS_ERROR_EOF,