- Need to focus on rbutton mouse down. And redraw selection when
[mono.git] / eglib / test / spawn.c
1 #include <glib.h>
2 #include <string.h>
3 #include <stdio.h>
4 #include "test.h"
5
6 RESULT
7 test_spawn_sync ()
8 {
9         gchar *out;
10         gchar *err;
11         gint status;
12         GError *error = NULL;
13
14         if (!g_spawn_command_line_sync ("ls", &out, &err, &status, &error))
15                 return FAILED ("Error executing 'ls'");
16
17         if (status != 0)
18                 return FAILED ("Status is %d", status);
19
20         if (out == NULL || strlen (out) == 0)
21                 return FAILED ("Didn't get any output from ls!?");
22
23         g_free (out);
24         g_free (err);
25         return OK;
26 }
27
28 static Test spawn_tests [] = {
29         {"g_shell_spawn_sync", test_spawn_sync},
30         {NULL, NULL}
31 };
32
33 DEFINE_TEST_GROUP_INIT(spawn_tests_init, spawn_tests)
34