summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6b55164)
2005-03-20 Tor Lillqvist <tml@novell.com>
* tests/testglib.c (main): Print more detailled output from the
timer tests. Don't print home directory twice. Test
g_win32_error_message().
* tests/spawn-test.c (run_tests): On Win32, run netstat instead of
ipconfig. On Windows XP collecting output from ipconfig doesn't
seem to work for some reason.
+2005-03-20 Tor Lillqvist <tml@novell.com>
+
+ * tests/testglib.c (main): Print more detailled output from the
+ timer tests. Don't print home directory twice. Test
+ g_win32_error_message().
+
+ * tests/spawn-test.c (run_tests): On Win32, run netstat instead of
+ ipconfig. On Windows XP collecting output from ipconfig doesn't
+ seem to work for some reason.
+
2005-03-18 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in : handle galiasdef.c (although completely
2005-03-18 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in : handle galiasdef.c (although completely
+2005-03-20 Tor Lillqvist <tml@novell.com>
+
+ * tests/testglib.c (main): Print more detailled output from the
+ timer tests. Don't print home directory twice. Test
+ g_win32_error_message().
+
+ * tests/spawn-test.c (run_tests): On Win32, run netstat instead of
+ ipconfig. On Windows XP collecting output from ipconfig doesn't
+ seem to work for some reason.
+
2005-03-18 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in : handle galiasdef.c (although completely
2005-03-18 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in : handle galiasdef.c (although completely
+2005-03-20 Tor Lillqvist <tml@novell.com>
+
+ * tests/testglib.c (main): Print more detailled output from the
+ timer tests. Don't print home directory twice. Test
+ g_win32_error_message().
+
+ * tests/spawn-test.c (run_tests): On Win32, run netstat instead of
+ ipconfig. On Windows XP collecting output from ipconfig doesn't
+ seem to work for some reason.
+
2005-03-18 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in : handle galiasdef.c (although completely
2005-03-18 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in : handle galiasdef.c (although completely
+2005-03-20 Tor Lillqvist <tml@novell.com>
+
+ * tests/testglib.c (main): Print more detailled output from the
+ timer tests. Don't print home directory twice. Test
+ g_win32_error_message().
+
+ * tests/spawn-test.c (run_tests): On Win32, run netstat instead of
+ ipconfig. On Windows XP collecting output from ipconfig doesn't
+ seem to work for some reason.
+
2005-03-18 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in : handle galiasdef.c (although completely
2005-03-18 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in : handle galiasdef.c (although completely
}
#else
#ifdef G_OS_WIN32
}
#else
#ifdef G_OS_WIN32
- printf ("Running ipconfig synchronously, collecting its output\n");
+ printf ("Running netstat synchronously, collecting its output\n");
- if (!g_spawn_command_line_sync ("ipconfig /all",
+ if (!g_spawn_command_line_sync ("netstat -n",
&output, &erroutput, NULL,
&err))
{
&output, &erroutput, NULL,
&err))
{
g_assert (output != NULL);
g_assert (erroutput != NULL);
g_assert (output != NULL);
g_assert (erroutput != NULL);
- if (strstr (output, "IP Configuration") == 0)
+ if (strstr (output, "Active Connections") == 0)
- printf ("output was '%s', should have contained 'IP Configuration'\n",
+ printf ("output was '%s', should have contained 'Active Connections'\n",
GMemChunk *mem_chunk;
GStringChunk *string_chunk;
GTimer *timer, *timer2;
GMemChunk *mem_chunk;
GStringChunk *string_chunk;
GTimer *timer, *timer2;
+ gdouble elapsed;
+ gulong elapsed_usecs;
gint nums[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
gint morenums[10] = { 8, 9, 7, 0, 3, 2, 5, 1, 4, 6};
gchar *string;
gint nums[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
gint morenums[10] = { 8, 9, 7, 0, 3, 2, 5, 1, 4, 6};
gchar *string;
g_print ("real: %s\n", g_get_real_name ());
s = g_get_home_dir ();
g_print ("home: %s\n", s ? s : "NULL!");
g_print ("real: %s\n", g_get_real_name ());
s = g_get_home_dir ();
g_print ("home: %s\n", s ? s : "NULL!");
- s = g_get_home_dir ();
- g_print ("home: %s\n", s ? s : "NULL!");
s = g_get_user_data_dir ();
g_print ("user_data: %s\n", s ? s : "NULL!");
s = g_get_user_config_dir ();
s = g_get_user_data_dir ();
g_print ("user_data: %s\n", s ? s : "NULL!");
s = g_get_user_config_dir ();
g_usleep((29*G_USEC_PER_SEC)/5); /* run timer for 5.8 seconds */
g_timer_stop(timer);
g_usleep((29*G_USEC_PER_SEC)/5); /* run timer for 5.8 seconds */
g_timer_stop(timer);
- g_print ("\t=> total elapsed = %.2f seconds (should be: 9.00 seconds)\n\n", g_timer_elapsed(timer, NULL));
+ elapsed = g_timer_elapsed (timer, &elapsed_usecs);
+ g_print ("\t=> total = %.6f = %d.%06ld (should be: 9.000000) (%.6f off)\n", elapsed, (int) elapsed, elapsed_usecs, ABS (elapsed - 9.));
- if (g_timer_elapsed(timer, NULL) > 8.8 && g_timer_elapsed(timer, NULL) < 9.2)
+ if (elapsed > 8.8 && elapsed < 9.2)
g_print ("g_timer_continue ... ok\n\n");
else
g_print ("g_timer_continue ... ***** FAILED *****\n\n");
g_timer_stop(timer2);
g_print ("g_timer_continue ... ok\n\n");
else
g_print ("g_timer_continue ... ***** FAILED *****\n\n");
g_timer_stop(timer2);
- if (g_timer_elapsed(timer2, NULL) > (8.8+6.5) && g_timer_elapsed(timer2, NULL) < (9.2+6.5))
+ elapsed = g_timer_elapsed(timer2, &elapsed_usecs);
+ g_print ("\t=> total elapsed = %.6f = %d.%06ld (should be: %.6f) (%.6f off)\n\n", elapsed, (int) elapsed, elapsed_usecs, 9.+6.5, ABS (elapsed - (9.+6.5)));
+
+ if (elapsed > (8.8+6.5) && elapsed < (9.2+6.5))
g_print ("timer2 ... ok\n\n");
else
g_print ("timer2 ... ***** FAILED *****\n\n");
g_print ("timer2 ... ok\n\n");
else
g_print ("timer2 ... ***** FAILED *****\n\n");
g_print ("found more.com as %s\n", g_find_program_in_path ("more.com"));
g_print ("found regedit as %s\n", g_find_program_in_path ("regedit"));
g_print ("found more.com as %s\n", g_find_program_in_path ("more.com"));
g_print ("found regedit as %s\n", g_find_program_in_path ("regedit"));
+ g_print ("a Win32 error message: %s\n", g_win32_error_message (2));
+
#endif
g_print ("checking file functions...\n");
#endif
g_print ("checking file functions...\n");