diff options
author | Damien F. Katz <damien@apache.org> | 2009-09-11 23:23:07 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2009-09-11 23:23:07 +0000 |
commit | 45796298231349dadf650e9ddefd7a6ff32e1302 (patch) | |
tree | 4de5543e9584a2c8a91f0b27b5b8f9e43de3fe46 /share/www/script/test | |
parent | 773a23353b9101620ebb91183cb67240c17aa2c9 (diff) |
Refactoring of endkey code in views and btrees. End key functionaility is now handled inside the btree code, simplfying calling code and making it trivial to add new collation options
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@814078 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test')
-rw-r--r-- | share/www/script/test/list_views.js | 4 | ||||
-rw-r--r-- | share/www/script/test/view_collation.js | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/share/www/script/test/list_views.js b/share/www/script/test/list_views.js index e297f0a3..d845f926 100644 --- a/share/www/script/test/list_views.js +++ b/share/www/script/test/list_views.js @@ -314,10 +314,10 @@ couchTests.list_views = function(debug) { }); T(xhr.status == 200, "multi key"); T(/Total Rows/.test(xhr.responseText)); - T(!(/Key: 1/.test(xhr.responseText))); + T(!(/Key: 1 /.test(xhr.responseText))); T(/Key: 2/.test(xhr.responseText)); T(/FirstKey: 2/.test(xhr.responseText)); - T(/LastKey: 7/.test(xhr.responseText)); + T(/LastKey: 11/.test(xhr.responseText)); // no multi-key fetch allowed when group=false xhr = CouchDB.request("POST", "/test_suite_db/_design/lists/_list/simpleForm/withReduce?group=false", { diff --git a/share/www/script/test/view_collation.js b/share/www/script/test/view_collation.js index 9bf06f9b..f4ae4a15 100644 --- a/share/www/script/test/view_collation.js +++ b/share/www/script/test/view_collation.js @@ -103,10 +103,14 @@ couchTests.view_collation = function(debug) { var rows = db.query(queryFun, null, {endkey : "b", descending:true, inclusive_end:false}).rows; T(rows[rows.length-1].key == "B") - - // inclusive_end=false overrides endkey_docid + var rows = db.query(queryFun, null, { - endkey : "b", endkey_docid: "b", + endkey : "b", endkey_docid: "10", inclusive_end:false}).rows; T(rows[rows.length-1].key == "aa") + + var rows = db.query(queryFun, null, { + endkey : "b", endkey_docid: "11", + inclusive_end:false}).rows; + T(rows[rows.length-1].key == "b") }; |