summaryrefslogtreecommitdiff
path: root/jstests/cursor1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/cursor1.js')
-rw-r--r--jstests/cursor1.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/jstests/cursor1.js b/jstests/cursor1.js
new file mode 100644
index 0000000..8448752
--- /dev/null
+++ b/jstests/cursor1.js
@@ -0,0 +1,20 @@
+
+t = db.cursor1
+t.drop();
+
+big = "";
+while ( big.length < 50000 )
+ big += "asdasdasdasdsdsdadsasdasdasD";
+
+num = Math.ceil( 10000000 / big.length );
+
+for ( var i=0; i<num; i++ ){
+ t.save( { num : i , str : big } );
+}
+
+assert.eq( num , t.find().count() );
+assert.eq( num , t.find().itcount() );
+
+assert.eq( num / 2 , t.find().limit(num/2).itcount() );
+
+t.drop(); // save some space