Commit 219857f8 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Add tests that show '!=' is not a valid conditional expression operator.

parent ff01912a
...@@ -1329,6 +1329,29 @@ static void test_condition(void) ...@@ -1329,6 +1329,29 @@ static void test_condition(void)
r = MsiEvaluateCondition(hpkg, "one < \"1\""); r = MsiEvaluateCondition(hpkg, "one < \"1\"");
ok( r == MSICONDITION_FALSE, "wrong return val\n"); ok( r == MSICONDITION_FALSE, "wrong return val\n");
MsiSetProperty(hpkg, "X", "5.0");
r = MsiEvaluateCondition(hpkg, "X != \"\"");
ok( r == MSICONDITION_ERROR, "wrong return val (%d)\n", r);
r = MsiEvaluateCondition(hpkg, "X =\"5.0\"");
ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r);
r = MsiEvaluateCondition(hpkg, "X =\"5.1\"");
ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r);
r = MsiEvaluateCondition(hpkg, "X =\"6.0\"");
ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r);
r = MsiEvaluateCondition(hpkg, "X =\"5.0\" or X =\"5.1\" or X =\"6.0\"");
ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r);
r = MsiEvaluateCondition(hpkg, "(X =\"5.0\" or X =\"5.1\" or X =\"6.0\")");
ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r);
r = MsiEvaluateCondition(hpkg, "X !=\"\" and (X =\"5.0\" or X =\"5.1\" or X =\"6.0\")");
ok( r == MSICONDITION_ERROR, "wrong return val (%d)\n", r);
MsiCloseHandle( hpkg ); MsiCloseHandle( hpkg );
DeleteFile(msifile); DeleteFile(msifile);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment