diff options
Diffstat (limited to 'jstests/regex3.js')
-rw-r--r-- | jstests/regex3.js | 7 |
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?/ } ) ); |