Return-Path: Delivered-To: apmail-couchdb-commits-archive@www.apache.org Received: (qmail 90450 invoked from network); 2 Jun 2009 20:26:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Jun 2009 20:26:33 -0000 Received: (qmail 87331 invoked by uid 500); 2 Jun 2009 20:26:45 -0000 Delivered-To: apmail-couchdb-commits-archive@couchdb.apache.org Received: (qmail 87298 invoked by uid 500); 2 Jun 2009 20:26:45 -0000 Mailing-List: contact commits-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list commits@couchdb.apache.org Received: (qmail 87289 invoked by uid 99); 2 Jun 2009 20:26:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2009 20:26:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Jun 2009 20:26:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 41B8E23888CB; Tue, 2 Jun 2009 20:26:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r781151 - /couchdb/branches/0.9.x/share/www/script/test/show_documents.js Date: Tue, 02 Jun 2009 20:26:21 -0000 To: commits@couchdb.apache.org From: jchris@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090602202621.41B8E23888CB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jchris Date: Tue Jun 2 20:26:20 2009 New Revision: 781151 URL: http://svn.apache.org/viewvc?rev=781151&view=rev Log: fix up diff breakage in js test case, backported error message test that passed Modified: couchdb/branches/0.9.x/share/www/script/test/show_documents.js Modified: couchdb/branches/0.9.x/share/www/script/test/show_documents.js URL: http://svn.apache.org/viewvc/couchdb/branches/0.9.x/share/www/script/test/show_documents.js?rev=781151&r1=781150&r2=781151&view=diff ============================================================================== --- couchdb/branches/0.9.x/share/www/script/test/show_documents.js (original) +++ couchdb/branches/0.9.x/share/www/script/test/show_documents.js Tue Jun 2 20:26:20 2009 @@ -33,8 +33,7 @@ } }), "just-name" : stringFun(function(doc, req) { - if (docm - + if (doc) { return { body : "Just " + doc.name }; @@ -50,6 +49,9 @@ json : req } }), + "render-error" : stringFun(function(doc, req) { + return noSuchVariable; + }), "xml-type" : stringFun(function(doc, req) { return { "headers" : { @@ -138,6 +140,10 @@ // hello template world xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/hello/"+docid); T(xhr.responseText == "Hello World"); + + // error stacktraces + xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/render-error/"+docid); + T(JSON.parse(xhr.responseText).error == "render_error"); // hello template world (no docid) xhr = CouchDB.request("GET", "/test_suite_db/_design/template/_show/hello"); @@ -301,4 +307,5 @@ }); T(xhr.getResponseHeader("Content-Type") == "text/html"); T(xhr.responseText == "Ha ha, you said \"plankton\"."); + };