diff options
Diffstat (limited to 'jstests/core/touch1.js')
-rw-r--r-- | jstests/core/touch1.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/jstests/core/touch1.js b/jstests/core/touch1.js new file mode 100644 index 00000000000..f7a0878f2e6 --- /dev/null +++ b/jstests/core/touch1.js @@ -0,0 +1,15 @@ + +t = db.touch1; +t.drop(); + +t.insert( { x : 1 } ); +t.ensureIndex( { x : 1 } ); + +res = t.runCommand( "touch" ); +assert( !res.ok, tojson( res ) ); + +res = t.runCommand( "touch", { data : true, index : true } ); +assert.eq( 1, res.data.numRanges, tojson( res ) ); +assert.eq( 2, res.indexes.numRanges, tojson( res ) ); + + |