From 41eeac05bff1b0a8b05f1110270c0beecd62991a Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Thu, 15 May 2008 11:44:37 +0000 Subject: ignore descending=false option instead of throwing an error. includes a test case git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@656589 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/couch_tests.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'share') diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js index cf1a4865..5f9cb5ae 100644 --- a/share/www/script/couch_tests.js +++ b/share/www/script/couch_tests.js @@ -423,6 +423,9 @@ var tests = { restartServer(); T(db.open(designDoc._id) == null); T(db.view("test/no_docs") == null); + + + }, view_collation: function(debug) { @@ -602,6 +605,19 @@ var tests = { T(queryResults.rows[j].key == i + 9 - j); } } + + // ignore decending=false. CouchDB should just ignore that. + for (i = 0; i < docs.length; i += 10) { + var queryResults = db.query(queryFun, {startkey:i, startkey_docid:i, + descending:false, count:10}); + T(queryResults.rows.length == 10) + T(queryResults.total_rows == docs.length) + T(queryResults.offset == i) + var j; + for (j = 0; j < 10;j++) { + T(queryResults.rows[j].key == i + j); + } + } }, view_sandboxing: function(debug) { -- cgit v1.2.3