summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2010-06-03 15:41:51 +0000
committerJan Lehnardt <jan@apache.org>2010-06-03 15:41:51 +0000
commite9970e71045eb9ea34976e24c287c729708f773d (patch)
treee5bb4bc93192ea6de4384e2645d8035f81dd347d
parent125b13026ac5e11a11805d647364cf214e014946 (diff)
Add test case for by-doc-id replication with slashes.
Patch by Filipe Manana. Closes COUCHDB-713. git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@951038 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--share/www/script/test/replication.js25
1 files changed, 24 insertions, 1 deletions
diff --git a/share/www/script/test/replication.js b/share/www/script/test/replication.js
index c03ce430..d2b3164b 100644
--- a/share/www/script/test/replication.js
+++ b/share/www/script/test/replication.js
@@ -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++) {