msi: Reorder the condition operators so that longer strings are matched first.

This allows ~<< to be properly matched.
This commit is contained in:
Aric Stewart 2009-03-16 11:05:11 -05:00 committed by Alexandre Julliard
parent 694219d4a6
commit 39600d9d2e
2 changed files with 11 additions and 2 deletions

View File

@ -553,14 +553,14 @@ static int COND_GetOperator( COND_input *cond )
const WCHAR str[4];
int id;
} table[] = {
{ {'~','=',0}, COND_IEQ },
{ {'~','<','=',0}, COND_ILE },
{ {'~','>','<',0}, COND_ISS },
{ {'~','>','>',0}, COND_IRHS },
{ {'~','<','>',0}, COND_INE },
{ {'~','<',0}, COND_ILT },
{ {'~','>','=',0}, COND_IGE },
{ {'~','<','<',0}, COND_ILHS },
{ {'~','=',0}, COND_IEQ },
{ {'~','<',0}, COND_ILT },
{ {'~','>',0}, COND_IGT },
{ {'>','=',0}, COND_GE },
{ {'>','<',0}, COND_SS },

View File

@ -1072,6 +1072,15 @@ static void test_condition(void)
r = MsiEvaluateCondition(hpkg, "not LicView");
ok( r == MSICONDITION_TRUE, "wrong return val\n");
r = MsiEvaluateCondition(hpkg, "\"Testing\" ~<< \"Testing\"");
ok (r == MSICONDITION_TRUE, "wrong return val\n");
r = MsiEvaluateCondition(hpkg, "LicView ~<< \"Testing\"");
ok (r == MSICONDITION_FALSE, "wrong return val\n");
r = MsiEvaluateCondition(hpkg, "Not LicView ~<< \"Testing\"");
ok (r == MSICONDITION_TRUE, "wrong return val\n");
r = MsiEvaluateCondition(hpkg, "not \"A\"");
ok( r == MSICONDITION_FALSE, "wrong return val\n");