summaryrefslogtreecommitdiff
path: root/jstests/core/ork.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/ork.js')
-rw-r--r--jstests/core/ork.js22
1 files changed, 17 insertions, 5 deletions
diff --git a/jstests/core/ork.js b/jstests/core/ork.js
index d6d40161e69..f367b6b4bad 100644
--- a/jstests/core/ork.js
+++ b/jstests/core/ork.js
@@ -3,9 +3,21 @@
t = db.jstests_ork;
t.drop();
-t.ensureIndex( {a:1} );
-t.save( {a:[1,2],b:5} );
-t.save( {a:[2,4],b:5} );
+t.ensureIndex({a: 1});
+t.save({a: [1, 2], b: 5});
+t.save({a: [2, 4], b: 5});
-assert.eq( 2, t.find( {$or:[{a:1,$and:[{$or:[{a:2},{a:3}]},{$or:[{b:5}]}]},{a:2,$or:[{a:3},{a:4}]}]} ).itcount() );
-assert.eq( 1, t.find( {$or:[{a:1,$and:[{$or:[{a:2},{a:3}]},{$or:[{b:6}]}]},{a:2,$or:[{a:3},{a:4}]}]} ).itcount() );
+assert.eq(2,
+ t.find({
+ $or: [
+ {a: 1, $and: [{$or: [{a: 2}, {a: 3}]}, {$or: [{b: 5}]}]},
+ {a: 2, $or: [{a: 3}, {a: 4}]}
+ ]
+ }).itcount());
+assert.eq(1,
+ t.find({
+ $or: [
+ {a: 1, $and: [{$or: [{a: 2}, {a: 3}]}, {$or: [{b: 6}]}]},
+ {a: 2, $or: [{a: 3}, {a: 4}]}
+ ]
+ }).itcount());