Jacek Caban : vbscript: Added if statement tests.
Alexandre Julliard
julliard at winehq.org
Tue Sep 13 12:18:10 CDT 2011
Module: wine
Branch: master
Commit: d028453f58bf86439795432e106c09ab46ad4271
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d028453f58bf86439795432e106c09ab46ad4271
Author: Jacek Caban <jacek at codeweavers.com>
Date: Tue Sep 13 11:39:26 2011 +0200
vbscript: Added if statement tests.
---
dlls/vbscript/tests/lang.vbs | 56 +++++++++++++++++++++++++++++++++++++++---
1 files changed, 52 insertions(+), 4 deletions(-)
diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs
index 6335069..3b428f1 100644
--- a/dlls/vbscript/tests/lang.vbs
+++ b/dlls/vbscript/tests/lang.vbs
@@ -81,10 +81,10 @@ Call ok("ab " & empty = "ab ", """ab"" & empty = " & ("ab " & empty))
Call ok(1 & 100000 = "1100000", "1 & 100000 = " & (1 & 100000))
Call ok("ab" & x = "abxx", """ab"" & x = " & ("ab"&x))
-'if(isEnglishLocale) then
-' Call ok("" & true = "True", """"" & true = " & true)
-' Call ok(true & false = "TrueFalse", "true & false = " & (true & false))
-'end if
+if(isEnglishLocale) then
+ Call ok("" & true = "True", """"" & true = " & true)
+ Call ok(true & false = "TrueFalse", "true & false = " & (true & false))
+end if
x = 3
Call ok(2+2 = 4, "2+2 = " & (2+2))
@@ -99,4 +99,52 @@ Call ok(getVT(2-null) = "VT_NULL", "getVT(2-null) = " & getVT(2-null))
Call ok(2-empty = 2, "2-empty = " & (2-empty))
Call ok(2-x = -1, "2-x = " & (2-x))
+if false then
+ ok false, "if false called"
+end if
+
+x = true
+if x then
+ x = false
+end if
+Call ok(not x, "x is false, if not evaluated?")
+
+x = false
+If false Then
+ Call ok(false, "inside if false")
+Else
+ x = true
+End If
+Call ok(x, "else not called?")
+
+x = false
+If false Then
+ Call ok(false, "inside if false")
+ElseIf not True Then
+ Call ok(false, "inside elseif not true")
+Else
+ x = true
+End If
+Call ok(x, "else not called?")
+
+x = false
+If false Then
+ Call ok(false, "inside if false")
+ x = 1
+ y = 10+x
+ElseIf not False Then
+ x = true
+Else
+ Call ok(false, "inside else not true")
+End If
+Call ok(x, "elseif not called?")
+
+x = false
+If false Then
+ Call ok(false, "inside if false")
+ElseIf not False Then
+ x = true
+End If
+Call ok(x, "elseif not called?")
+
reportSuccess()
More information about the wine-cvs
mailing list