diff options
author | Aaron <aaron@10gen.com> | 2009-04-21 15:57:33 -0400 |
---|---|---|
committer | Aaron <aaron@10gen.com> | 2009-04-21 15:57:33 -0400 |
commit | 302bc3a3b0c9b10941cb228bf350d97ffcc7f0b4 (patch) | |
tree | 4e6594611e5d85593c43430c852165aa06b1a97d /jstests/index8.js | |
parent | 6667485a4e1ec0e2953d4fe3cfca2ab622916bda (diff) | |
parent | e0fd1d4c26db0cc3c2032382cac9ebb0d88ee21d (diff) | |
download | mongo-302bc3a3b0c9b10941cb228bf350d97ffcc7f0b4.tar.gz |
Merge branch 'master' of git@github.com:mongodb/mongo
Diffstat (limited to 'jstests/index8.js')
-rw-r--r-- | jstests/index8.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/index8.js b/jstests/index8.js index 59e9ae04954..b2b9a83a885 100644 --- a/jstests/index8.js +++ b/jstests/index8.js @@ -44,3 +44,11 @@ t.ensureIndex( { a: 1 }, true ); t.save( { a: [ 2, 3 ] } ); t.save( { a: 2 } ); assert.eq( 1, t.find().count() ); + +t.drop(); +t.ensureIndex( { a: 1 }, true ); +t.save( { a: 2 } ); +t.save( { a: [ 1, 2, 3 ] } ); +t.save( { a: [ 3, 2, 1 ] } ); +assert.eq( 1, t.find().sort( { a: 1 } ).hint( { a: 1 } ).toArray().length ); +assert.eq( 1, t.find().sort( { a: -1 } ).hint( { a: 1 } ).toArray().length ); |