[VBSCRIPT_WINETEST] Sync with Wine Staging 1.9.23. CORE-12409
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 17 Nov 2016 23:16:08 +0000 (23:16 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 17 Nov 2016 23:16:08 +0000 (23:16 +0000)
svn path=/trunk/; revision=73299

rostests/winetests/vbscript/api.vbs
rostests/winetests/vbscript/run.c

index 2a365c7..f6b6f69 100644 (file)
@@ -440,6 +440,35 @@ TestLCase 0.123, doubleAsString(0.123)
 TestLCase Empty, ""
 Call ok(getVT(LCase(Null)) = "VT_NULL", "getVT(LCase(Null)) = " & getVT(LCase(Null)))
 
+Sub TestStrComp(str_left, str_right, mode, ex)
+    x = StrComp(str_left, str_right, mode)
+    Call ok(x = ex, "StrComp(" & str_left & ", " & str_right & ", " & mode & ") = " & x & " expected " & ex)
+End Sub
+
+TestStrComp "ABC",  "abc",  0, -1
+TestStrComp "abc",  "ABC",  0,  1
+TestStrComp "ABC",  "ABC",  0,  0
+TestStrComp "ABC",  "abc",  0, -1
+TestStrComp "abc",  "ABC",  0,  1
+TestStrComp "ABC",  "ABC",  0,  0
+TestStrComp "ABCD", "ABC",  0,  1
+TestStrComp "ABC",  "ABCD", 0, -1
+TestStrComp "ABC",  "abc",  1,  0
+TestStrComp "ABC",  "ABC",  1,  0
+TestStrComp "ABCD", "ABC",  1,  1
+TestStrComp "ABC",  "ABCD", 1, -1
+TestStrComp "ABC",  "ABCD", "0", -1
+TestStrComp "ABC",  "ABCD", "1", -1
+TestStrComp 1,      1,      1,  0
+TestStrComp "1",    1,      1,  0
+TestStrComp "1",    1.0,    1,  0
+TestStrComp Empty,  Empty,  1,  0
+TestStrComp Empty,  "",     1,  0
+TestStrComp Empty,  "ABC",  1,  -1
+TestStrComp "ABC",  Empty,  1,  1
+TestStrComp vbNull, vbNull, 1,  0
+TestStrComp "",     vbNull, 1,  -1
+
 Call ok(Len("abc") = 3, "Len(abc) = " & Len("abc"))
 Call ok(Len("") = 0, "Len() = " & Len(""))
 Call ok(Len(1) = 1, "Len(1) = " & Len(1))
index fa111c0..8821b79 100644 (file)
@@ -2133,6 +2133,12 @@ static void run_tests(void)
     CHECK_CALLED(global_success_d);
     CHECK_CALLED(global_success_i);
 
+    SET_EXPECT(global_success_d);
+    SET_EXPECT(global_success_i);
+    parse_script_af(0, "TEST.reportSuccess()");
+    CHECK_CALLED(global_success_d);
+    CHECK_CALLED(global_success_i);
+
     SET_EXPECT(global_vbvar_d);
     SET_EXPECT(global_vbvar_i);
     parse_script_a("Option Explicit\nvbvar = 3");