msi: Add tests for MsiEvaluateCondition's substring operators.
This commit is contained in:
parent
73137390b0
commit
762a13eb34
|
@ -1005,6 +1005,191 @@ static void test_condition(void)
|
|||
r = MsiEvaluateCondition(hpkg, "bandalmael<>0");
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "hi");
|
||||
MsiSetProperty(hpkg, "two", "hithere");
|
||||
r = MsiEvaluateCondition(hpkg, "one >< two");
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "hithere");
|
||||
MsiSetProperty(hpkg, "two", "hi");
|
||||
r = MsiEvaluateCondition(hpkg, "one >< two");
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "hello");
|
||||
MsiSetProperty(hpkg, "two", "hi");
|
||||
r = MsiEvaluateCondition(hpkg, "one >< two");
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "hellohithere");
|
||||
MsiSetProperty(hpkg, "two", "hi");
|
||||
r = MsiEvaluateCondition(hpkg, "one >< two");
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "");
|
||||
MsiSetProperty(hpkg, "two", "hi");
|
||||
r = MsiEvaluateCondition(hpkg, "one >< two");
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "hi");
|
||||
MsiSetProperty(hpkg, "two", "");
|
||||
r = MsiEvaluateCondition(hpkg, "one >< two");
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "");
|
||||
MsiSetProperty(hpkg, "two", "");
|
||||
r = MsiEvaluateCondition(hpkg, "one >< two");
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "1234");
|
||||
MsiSetProperty(hpkg, "two", "1");
|
||||
r = MsiEvaluateCondition(hpkg, "one >< two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "one 1234");
|
||||
MsiSetProperty(hpkg, "two", "1");
|
||||
r = MsiEvaluateCondition(hpkg, "one >< two");
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "hithere");
|
||||
MsiSetProperty(hpkg, "two", "hi");
|
||||
r = MsiEvaluateCondition(hpkg, "one << two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "hi");
|
||||
MsiSetProperty(hpkg, "two", "hithere");
|
||||
r = MsiEvaluateCondition(hpkg, "one << two");
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "hi");
|
||||
MsiSetProperty(hpkg, "two", "hi");
|
||||
r = MsiEvaluateCondition(hpkg, "one << two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "abcdhithere");
|
||||
MsiSetProperty(hpkg, "two", "hi");
|
||||
r = MsiEvaluateCondition(hpkg, "one << two");
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "");
|
||||
MsiSetProperty(hpkg, "two", "hi");
|
||||
r = MsiEvaluateCondition(hpkg, "one << two");
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "hithere");
|
||||
MsiSetProperty(hpkg, "two", "");
|
||||
r = MsiEvaluateCondition(hpkg, "one << two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "");
|
||||
MsiSetProperty(hpkg, "two", "");
|
||||
r = MsiEvaluateCondition(hpkg, "one << two");
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "1234");
|
||||
MsiSetProperty(hpkg, "two", "1");
|
||||
r = MsiEvaluateCondition(hpkg, "one << two");
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
|
||||
MsiSetProperty(hpkg, "one", "1234 one");
|
||||
MsiSetProperty(hpkg, "two", "1");
|
||||
r = MsiEvaluateCondition(hpkg, "one << two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "hithere");
|
||||
MsiSetProperty(hpkg, "two", "there");
|
||||
r = MsiEvaluateCondition(hpkg, "one >> two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "hithere");
|
||||
MsiSetProperty(hpkg, "two", "hi");
|
||||
r = MsiEvaluateCondition(hpkg, "one >> two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "there");
|
||||
MsiSetProperty(hpkg, "two", "hithere");
|
||||
r = MsiEvaluateCondition(hpkg, "one >> two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "there");
|
||||
MsiSetProperty(hpkg, "two", "there");
|
||||
r = MsiEvaluateCondition(hpkg, "one >> two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "abcdhithere");
|
||||
MsiSetProperty(hpkg, "two", "hi");
|
||||
r = MsiEvaluateCondition(hpkg, "one >> two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "");
|
||||
MsiSetProperty(hpkg, "two", "there");
|
||||
r = MsiEvaluateCondition(hpkg, "one >> two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "there");
|
||||
MsiSetProperty(hpkg, "two", "");
|
||||
r = MsiEvaluateCondition(hpkg, "one >> two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "");
|
||||
MsiSetProperty(hpkg, "two", "");
|
||||
r = MsiEvaluateCondition(hpkg, "one >> two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "1234");
|
||||
MsiSetProperty(hpkg, "two", "4");
|
||||
r = MsiEvaluateCondition(hpkg, "one >> two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_FALSE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiSetProperty(hpkg, "one", "one 1234");
|
||||
MsiSetProperty(hpkg, "two", "4");
|
||||
r = MsiEvaluateCondition(hpkg, "one >> two");
|
||||
todo_wine
|
||||
{
|
||||
ok( r == MSICONDITION_TRUE, "wrong return val\n");
|
||||
}
|
||||
|
||||
MsiCloseHandle( hpkg );
|
||||
DeleteFile(msifile);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue