msi [1/2]: Add tests for MsiEvaluateCondition's substring operators
James Hawkins
truiken at gmail.com
Mon Aug 21 18:27:17 CDT 2006
Hi,
These operators are used in Corel installers, among others.
Changelog
* Add tests for MsiEvaluateCondition's substring operators.
dlls/msi/tests/package.c | 185 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 185 insertions(+), 0 deletions(-)
--
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 7aca319..a2d5459 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -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);
}
--
1.4.2
More information about the wine-patches
mailing list