diff options
Diffstat (limited to 'jstests/core/regex9.js')
-rw-r--r-- | jstests/core/regex9.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/jstests/core/regex9.js b/jstests/core/regex9.js index e12310ee848..96188d689dc 100644 --- a/jstests/core/regex9.js +++ b/jstests/core/regex9.js @@ -2,10 +2,10 @@ t = db.regex9; t.drop(); -t.insert( { _id : 1 , a : [ "a" , "b" , "c" ] } ); -t.insert( { _id : 2 , a : [ "a" , "b" , "c" , "d" ] } ); -t.insert( { _id : 3 , a : [ "b" , "c" , "d" ] } ); +t.insert({_id: 1, a: ["a", "b", "c"]}); +t.insert({_id: 2, a: ["a", "b", "c", "d"]}); +t.insert({_id: 3, a: ["b", "c", "d"]}); -assert.eq( 2 , t.find( { a : /a/ } ).itcount() , "A1" ); -assert.eq( 2 , t.find( { a : { $regex : "a" } } ).itcount() , "A2" ); -assert.eq( 2 , t.find( { a : { $regex : /a/ } } ).itcount() , "A3" ); +assert.eq(2, t.find({a: /a/}).itcount(), "A1"); +assert.eq(2, t.find({a: {$regex: "a"}}).itcount(), "A2"); +assert.eq(2, t.find({a: {$regex: /a/}}).itcount(), "A3"); |