summaryrefslogtreecommitdiff
path: root/tests/spawn-test-win32-gui.c
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2004-03-10 22:59:14 +0000
committerTor Lillqvist <tml@src.gnome.org>2004-03-10 22:59:14 +0000
commitf4cb22c78d573d53dba62b7f6743cbe0a1d1e135 (patch)
treee8e5db92878a997ecfd47b116443cb9d16b079e8 /tests/spawn-test-win32-gui.c
parent55df929d482fd30c46ff5ffd1c9267e5993a5462 (diff)
downloadglib-f4cb22c78d573d53dba62b7f6743cbe0a1d1e135.tar.gz
glib/gspawn-win32.c Implement G_SPAWN_FILE_AND_ARGV_ZERO. (#136792, Bruce
2004-03-10 Tor Lillqvist <tml@iki.fi> * glib/gspawn-win32.c * glib/gspawn-win32-helper.c: Implement G_SPAWN_FILE_AND_ARGV_ZERO. (#136792, Bruce Hochstetler) * tests/spawn-test.c * tests/spawn-test-win32-gui.c: Test it.
Diffstat (limited to 'tests/spawn-test-win32-gui.c')
-rw-r--r--tests/spawn-test-win32-gui.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/spawn-test-win32-gui.c b/tests/spawn-test-win32-gui.c
index 8622d4411..aade3e73a 100644
--- a/tests/spawn-test-win32-gui.c
+++ b/tests/spawn-test-win32-gui.c
@@ -10,7 +10,14 @@ WinMain (struct HINSTANCE__ *hInstance,
char *lpszCmdLine,
int nCmdShow)
{
- if (__argc <= 2)
+ char buf[100];
+
+ if (__argc >= 2 && strcmp (__argv[1], "nop") == 0)
+ {
+ sprintf (buf, "spawn-test-win32-gui: argv[0]=\"%s\"", __argv[0]);
+ MessageBox (NULL, buf, lpszCmdLine, MB_ICONINFORMATION|MB_SYSTEMMODAL);
+ }
+ else if (__argc <= 2)
{
MessageBox (NULL, "spawn-test-win32-gui: Will write to stdout",
lpszCmdLine, MB_ICONINFORMATION|MB_SYSTEMMODAL);
@@ -29,7 +36,6 @@ WinMain (struct HINSTANCE__ *hInstance,
int infd = atoi (__argv[2]);
int outfd = atoi (__argv[3]);
int k, n;
- char buf[100];
if (infd < 0 || outfd < 0)
{
@@ -87,9 +93,6 @@ WinMain (struct HINSTANCE__ *hInstance,
}
}
- MessageBox (NULL, "spawn-test-win32-gui: Sleeping a bit.",
- lpszCmdLine, MB_ICONINFORMATION|MB_SYSTEMMODAL);
-
Sleep (2000);
MessageBox (NULL, "spawn-test-win32-gui: Done, exiting.",