#define BUFFER_SIZE 1024
-static const gchar *datapath;
-
static void
test_small_writes (void)
{
const gchar encoding[] = "EUC-JP";
GIOStatus status;
- if (g_getenv ("G_TEST_DATA"))
- datapath = g_getenv ("G_TEST_DATA");
- else
- datapath = SRCDIR;
+ g_test_init (&argc, &argv, NULL);
+
+ filename = g_test_build_filename (G_TEST_DIST, "iochannel-test-infile", NULL);
- filename = g_build_filename (datapath, "iochannel-test-infile", NULL);
-
setbuf (stdout, NULL); /* For debugging */
gio_r = g_io_channel_new_file (filename, "r", &gerr);
g_io_channel_unref(gio_w);
test_small_writes ();
-
+
+ g_free (filename);
+ g_string_free (buffer, TRUE);
+
return 0;
}