summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
Diffstat (limited to 'jstests')
-rw-r--r--jstests/regex5.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/jstests/regex5.js b/jstests/regex5.js
new file mode 100644
index 00000000000..7fe39d55f8f
--- /dev/null
+++ b/jstests/regex5.js
@@ -0,0 +1,13 @@
+
+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