summaryrefslogtreecommitdiff
path: root/dbtests
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2009-05-21 10:05:26 -0400
committerEliot Horowitz <eliot@10gen.com>2009-05-21 10:05:26 -0400
commited74bbf25ae0cd85e1ffba3bf545ba29c6b23023 (patch)
tree4f89a506a4e5d9aaf62b3a6a95f8aab5c960d5c3 /dbtests
parent0ca5213f8be25c2ac08ed44dccffbe859dd419c7 (diff)
downloadmongo-ed74bbf25ae0cd85e1ffba3bf545ba29c6b23023.tar.gz
more weird js syntax handling
Diffstat (limited to 'dbtests')
-rw-r--r--dbtests/jstests.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/dbtests/jstests.cpp b/dbtests/jstests.cpp
index 5521e63118f..300b69a69fd 100644
--- a/dbtests/jstests.cpp
+++ b/dbtests/jstests.cpp
@@ -139,9 +139,12 @@ namespace JSTests {
s->invoke( "function (){ return this.x == 17; }" , BSONObj() );
ASSERT_EQUALS( true , s->getBoolean( "return" ) );
-
+
s->invoke( "function z(){ return this.x == 18; }" , BSONObj() );
ASSERT_EQUALS( false , s->getBoolean( "return" ) );
+
+ s->invoke( "x = 5; for( ; x <10; x++){ a = 1; }" , BSONObj() );
+ ASSERT_EQUALS( 10 , s->getNumber( "x" ) );
delete s;
}