From 3ff18b6b7ca953224e5f03061acefb1ddb69b165 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Tue, 7 Sep 2010 06:28:58 +0000 Subject: 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 --- share/www/script/test/view_errors.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'share/www/script/test/view_errors.js') 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)); + } }); }; -- cgit v1.2.3