diff options
Diffstat (limited to 'share/www/script')
-rw-r--r-- | share/www/script/test/view_offsets.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/share/www/script/test/view_offsets.js b/share/www/script/test/view_offsets.js index 31dee8e9..9bbce759 100644 --- a/share/www/script/test/view_offsets.js +++ b/share/www/script/test/view_offsets.js @@ -88,12 +88,19 @@ couchTests.view_offsets = function(debug) { ]; db.bulkSave(docs); - var res = db.view("test/offset", { + var res1 = db.view("test/offset", { startkey: ["b",4], startkey_docid: "b4", endkey: ["b"], limit: 2, descending: true, skip: 1 }) - return res.offset == 4; + var res2 = db.view("test/offset", {startkey: ["c", 3]}); + var res3 = db.view("test/offset", { + startkey: ["b", 6], + endkey: ["b", 7] + }); + + return res1.offset == 4 && res2.offset == docs.length && res3.offset == 8; + }; for(var i = 0; i < 15; i++) T(runTest()); |