couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r951045 - /couchdb/branches/0.11.x/share/www/script/test/replication.js
Date Thu, 03 Jun 2010 15:56:26 GMT
Author: jan
Date: Thu Jun  3 15:56:25 2010
New Revision: 951045

URL: http://svn.apache.org/viewvc?rev=951045&view=rev
Log:
Add test case for by-doc-id replication with slashes.

Patch by Filipe Manana.

Closes COUCHDB-713.

Modified:
    couchdb/branches/0.11.x/share/www/script/test/replication.js

Modified: couchdb/branches/0.11.x/share/www/script/test/replication.js
URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/share/www/script/test/replication.js?rev=951045&r1=951044&r2=951045&view=diff
==============================================================================
--- couchdb/branches/0.11.x/share/www/script/test/replication.js (original)
+++ couchdb/branches/0.11.x/share/www/script/test/replication.js Thu Jun  3 15:56:25 2010
@@ -342,6 +342,25 @@ couchTests.replication = function(debug)
     {
       _id: "foo3",
       value: "c"
+    },
+    {
+      _id: "slashed/foo",
+      value: "s"
+    },
+    {
+      _id: "_design/foobar",
+      language: "javascript",
+      value: "I am a design doc",
+      filters: {
+        idfilter: (function(doc, req) {
+          return doc.value == Number(req.filter_value);
+        }).toString()
+      },
+      views: {
+        countview: (function(doc) {
+          emit(doc.value, 1);
+        }).toString()
+      }
     }
   ];
 
@@ -364,7 +383,11 @@ couchTests.replication = function(debug)
     ["foo1", "foo3", "foo666"],
     ["foo1", "foo666"],
     ["foo666", "foo2"],
-    ["foo2", "foo9999", "foo1"]
+    ["foo2", "foo9999", "foo1"],
+    ["foo3", "slashed/foo"],
+    ["foo3", "slashed%2Ffoo"],
+    ["foo1", "_design/foobar"],
+    ["foo1", "foo1001", "_design%2Ffoobar"]
   ];
 
   for (var i = 0; i < dbPairs.length; i++) {



Mime
View raw message