summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Staple <aaron@aaron-staples-macbook-pro.local>2009-08-20 17:51:59 -0700
committerAaron Staple <aaron@aaron-staples-macbook-pro.local>2009-08-20 17:51:59 -0700
commit6e8e7bd75c6e8589745ab70da2deb10be5ef3698 (patch)
tree2c9265696ad5eab65576a9c4efc030cfe684cdfb
parent280d239455d8df6b29d4afb096a77bf57839378b (diff)
downloadmongo-6e8e7bd75c6e8589745ab70da2deb10be5ef3698.tar.gz
MINOR additional case for SERVER-239
-rw-r--r--jstests/regex3.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/jstests/regex3.js b/jstests/regex3.js
index 1dcd867e436..91ab3c5c03c 100644
--- a/jstests/regex3.js
+++ b/jstests/regex3.js
@@ -28,3 +28,10 @@ assert.eq( 3 , t.find( { name : /^aa*/ } ).explain().nscanned , "B i 1 e" );
assert.eq( 2 , t.find( { name : /^a[ab]/ } ).count() , "B i 2" );
assert.eq( 2 , t.find( { name : /^a[bc]/ } ).count() , "B i 3" );
+t.drop();
+
+t.save( { name: "" } );
+assert.eq( 1, t.count( { name: /^a?/ } ) );
+// fix
+// t.ensureIndex( { name: 1 } );
+// assert.eq( 1, t.count( { name: /^a?/ } ) );