0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
mongodb/jstests/regex5.js
2009-12-22 07:26:51 -05:00

14 lines
312 B
JavaScript

t = db.regex5
t.drop()
t.save( { x : [ "abc" , "xyz" ] } )
t.save( { x : [ "ac" , "xyz" ] } )
a = /.*b.*c/
x = /.*y.*/
assert.eq( 1 , t.find( { x : a } ).count() , "A" )
assert.eq( 2 , t.find( { x : x } ).count() , "B" )
// assert.eq( 1 , t.find( { x : { $all : [ a , x ] } } ).count() , "C" ) // SERVER-505