diff options
author | Paul Joseph Davis <davisp@apache.org> | 2009-07-08 01:33:00 +0000 |
---|---|---|
committer | Paul Joseph Davis <davisp@apache.org> | 2009-07-08 01:33:00 +0000 |
commit | 02cb712e18ee5647517fc38b6aa0c188af090894 (patch) | |
tree | 952b52231a0266bbe9db53a3043fd2adcc68e0da /share | |
parent | 6012a3374081d92eaade74b15f1c072aaa6ec09f (diff) |
Fixes COUCHDB-389
Provide an offset calculation for all view responses.
Thanks Brad Anderson.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@792013 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share')
-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()); |