Francois Gouget : advpack: Skip some tests if not in interactive mode because they pop up dialogs.
Alexandre Julliard
julliard at winehq.org
Wed Nov 14 07:29:58 CST 2007
Module: wine
Branch: master
Commit: 4f16a43c2c368a8db4789168257c735b7c1219ee
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f16a43c2c368a8db4789168257c735b7c1219ee
Author: Francois Gouget <fgouget at free.fr>
Date: Tue Nov 13 20:50:14 2007 +0100
advpack: Skip some tests if not in interactive mode because they pop up dialogs.
---
dlls/advpack/tests/install.c | 26 +++++++++++++++++++-------
1 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/dlls/advpack/tests/install.c b/dlls/advpack/tests/install.c
index 7f83cf8..6075963 100644
--- a/dlls/advpack/tests/install.c
+++ b/dlls/advpack/tests/install.c
@@ -203,9 +203,15 @@ static void test_LaunchINFSection(void)
char cmdline[MAX_PATH];
static char file[] = "test.inf,DefaultInstall,4,0";
- /* try an invalid cmdline */
- hr = pLaunchINFSection(NULL, NULL, NULL, 0);
- ok(hr == 1, "Expected 1, got %d\n", hr);
+ /* The 'No UI' flag seems to have no effect whatsoever on Windows.
+ * So only do this test in interactive mode.
+ */
+ if (winetest_interactive)
+ {
+ /* try an invalid cmdline */
+ hr = pLaunchINFSection(NULL, NULL, NULL, 0);
+ ok(hr == 1, "Expected 1, got %d\n", hr);
+ }
CreateDirectoryA("one", NULL);
create_inf_file("one\\test.inf");
@@ -243,10 +249,16 @@ static void test_LaunchINFSectionEx(void)
hr = pLaunchINFSectionEx(NULL, NULL, cmdline, 0);
ok(hr == 0, "Expected 0, got %d\n", hr);
- /* try an invalid CAB filename with a relative INF name */
- lstrcpy(cmdline, "test.inf,DefaultInstall,c:imacab.cab,4");
- hr = pLaunchINFSectionEx(NULL, NULL, cmdline, 0);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
+ /* The 'No UI' flag seems to have no effect whatsoever on Windows.
+ * So only do this test in interactive mode.
+ */
+ if (winetest_interactive)
+ {
+ /* try an invalid CAB filename with a relative INF name */
+ lstrcpy(cmdline, "test.inf,DefaultInstall,c:imacab.cab,4");
+ hr = pLaunchINFSectionEx(NULL, NULL, cmdline, 0);
+ ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %d\n", hr);
+ }
DeleteFileA("test.inf");
}
More information about the wine-cvs
mailing list