summaryrefslogtreecommitdiff
path: root/share/www/script/test/view_errors.js
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-09-07 06:28:58 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-09-07 06:28:58 +0000
commit3ff18b6b7ca953224e5f03061acefb1ddb69b165 (patch)
treee362a22139cd4d7000a97e0b8d8227ec2c5694d8 /share/www/script/test/view_errors.js
parent1c1c7d8359053b8b4b473903b7fadd354064c032 (diff)
warn when a view query will be empty due to backwards start and end keys
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@993226 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/test/view_errors.js')
-rw-r--r--share/www/script/test/view_errors.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/share/www/script/test/view_errors.js b/share/www/script/test/view_errors.js
index a211c061..c6cbcc55 100644
--- a/share/www/script/test/view_errors.js
+++ b/share/www/script/test/view_errors.js
@@ -158,5 +158,13 @@ couchTests.view_errors = function(debug) {
T(xhr.status == 500);
result = JSON.parse(xhr.responseText);
T(result.error == "reduce_overflow_error");
+
+ try {
+ db.query(function() {emit(null, null)}, null, {startkey: 2, endkey:1});
+ T(0 == 1);
+ } catch(e) {
+ T(e.error == "query_parse_error");
+ T(e.reason.match(/no rows can match/i));
+ }
});
};