Module: wine Branch: master Commit: cbb735e2ce46d865c02524d7024a1f0921f1811b URL: http://source.winehq.org/git/wine.git/?a=commit;h=cbb735e2ce46d865c02524d702...
Author: Jacek Caban jacek@codeweavers.com Date: Thu Sep 22 14:24:20 2011 +0200
vbscript: Added for..in statement tests.
---
dlls/vbscript/tests/lang.vbs | 56 +++++++++++++++++++++++++++++++++++++++++- 1 files changed, 55 insertions(+), 1 deletions(-)
diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 2d712f5..3b3ad50 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -18,7 +18,7 @@
Option Explicit
-dim x, y +dim x, y, z
call ok(true, "true is not true?") ok true, "true is not true?" @@ -333,6 +333,60 @@ do ok false, "exit do didn't work" loop while true
+y = "for1:" +for x = 5 to 8 + y = y & " " & x +next +Call ok(y = "for1: 5 6 7 8", "y = " & y) + +y = "for2:" +for x = 5 to 8 step 2 + y = y & " " & x +next +Call ok(y = "for2: 5 7", "y = " & y) + +y = "for3:" +x = 2 +for x = x+3 to 8 + y = y & " " & x +next +Call ok(y = "for3: 5 6 7 8", "y = " & y) + +y = "for4:" +for x = 5 to 4 + y = y & " " & x +next +Call ok(y = "for4:", "y = " & y) + +y = "for5:" +for x = 5 to 3 step true + y = y & " " & x +next +Call ok(y = "for5: 5 4 3", "y = " & y) + +y = "for6:" +z = 4 +for x = 5 to z step 3-4 + y = y & " " & x + z = 0 +next +Call ok(y = "for6: 5 4", "y = " & y) + +y = "for7:" +z = 1 +for x = 5 to 8 step z + y = y & " " & x + z = 2 +next +Call ok(y = "for7: 5 6 7 8", "y = " & y) + +y = "for8:" +for x = 5 to 8 + y = y & " " & x + x = x+1 +next +Call ok(y = "for8: 5 7", "y = " & y) + if false then Sub testsub x = true