Author: jchris
Date: Sun Sep 12 09:03:43 2010
New Revision: 996270

URL: http://svn.apache.org/viewvc?rev=996270&view=rev
Log:
additional test for non-circular commonjs require. closes COUCHDB-869

Modified:
    couchdb/branches/1.0.x/share/www/script/test/design_docs.js

Modified: couchdb/branches/1.0.x/share/www/script/test/design_docs.js
URL: 
http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/design_docs.js?rev=996270&r1=996269&r2=996270&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/design_docs.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/design_docs.js Sun Sep 12 
09:03:43 2010
@@ -58,7 +58,8 @@ function() {
     },
     shows: {
       simple: "function() {return 'ok'};",
-      requirey : "function() { var lib = require('whatever/commonjs/upper'); 
return lib.testing; };"
+      requirey : "function() { var lib = require('whatever/commonjs/upper'); 
return lib.testing; };",
+      circular : "function() { var lib = require('whatever/commonjs/upper'); 
return JSON.stringify(this); };"
     }
   }; 
 
@@ -88,6 +89,10 @@ function() {
   T(xhr.status == 200);
   TEquals("PLANKTONwhatever/commonjs/upperplankton", xhr.responseText);
 
+  var xhr = CouchDB.request("GET", 
"/test_suite_db/_design/test/_show/circular");
+  T(xhr.status == 200);
+  TEquals("javascript", JSON.parse(xhr.responseText).language);
+
   // test that we get design doc info back
   var dinfo = db.designInfo("_design/test");
   TEquals("test", dinfo.name);


Reply via email to