Commit 762a13eb authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Add tests for MsiEvaluateCondition's substring operators.

parent 73137390
......@@ -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);
}
......
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