diff options
author | Jan Lehnardt <jan@apache.org> | 2008-05-15 11:44:37 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2008-05-15 11:44:37 +0000 |
commit | 41eeac05bff1b0a8b05f1110270c0beecd62991a (patch) | |
tree | 44c3df897d2f4e52d087e04236d1d2e7fab5f6b4 /share/www/script | |
parent | 0816508c89c1d4fc851c1824cf8c78fe2519be67 (diff) |
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
Diffstat (limited to 'share/www/script')
-rw-r--r-- | share/www/script/couch_tests.js | 16 |
1 files changed, 16 insertions, 0 deletions
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) { |