couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r1036449 - in /couchdb/branches/1.0.x/share/www/script: ./ test/
Date Thu, 18 Nov 2010 13:27:21 GMT
Author: fdmanana
Date: Thu Nov 18 13:27:21 2010
New Revision: 1036449

URL: http://svn.apache.org/viewvc?rev=1036449&view=rev
Log:
Merged revisions 986710, 988909, 997862, 998090, 1005513 and 1036447 from trunk to make the JavaScript test suite work as well on Chrome/Chromium and Safari.

Modified:
    couchdb/branches/1.0.x/share/www/script/couch.js
    couchdb/branches/1.0.x/share/www/script/couch_test_runner.js
    couchdb/branches/1.0.x/share/www/script/jquery.couch.js
    couchdb/branches/1.0.x/share/www/script/test/attachment_names.js
    couchdb/branches/1.0.x/share/www/script/test/attachment_paths.js
    couchdb/branches/1.0.x/share/www/script/test/attachment_views.js
    couchdb/branches/1.0.x/share/www/script/test/attachments.js
    couchdb/branches/1.0.x/share/www/script/test/attachments_multipart.js
    couchdb/branches/1.0.x/share/www/script/test/basics.js
    couchdb/branches/1.0.x/share/www/script/test/bulk_docs.js
    couchdb/branches/1.0.x/share/www/script/test/compact.js
    couchdb/branches/1.0.x/share/www/script/test/conflicts.js
    couchdb/branches/1.0.x/share/www/script/test/cookie_auth.js
    couchdb/branches/1.0.x/share/www/script/test/erlang_views.js
    couchdb/branches/1.0.x/share/www/script/test/etags_views.js
    couchdb/branches/1.0.x/share/www/script/test/list_views.js
    couchdb/branches/1.0.x/share/www/script/test/method_override.js
    couchdb/branches/1.0.x/share/www/script/test/proxyauth.js
    couchdb/branches/1.0.x/share/www/script/test/purge.js
    couchdb/branches/1.0.x/share/www/script/test/recreate_doc.js
    couchdb/branches/1.0.x/share/www/script/test/reduce.js
    couchdb/branches/1.0.x/share/www/script/test/reduce_builtin.js
    couchdb/branches/1.0.x/share/www/script/test/stats.js
    couchdb/branches/1.0.x/share/www/script/test/view_multi_key_design.js
    couchdb/branches/1.0.x/share/www/script/test/view_sandboxing.js
    couchdb/branches/1.0.x/share/www/script/test/view_update_seq.js

Modified: couchdb/branches/1.0.x/share/www/script/couch.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/couch.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/couch.js [utf-8] (original)
+++ couchdb/branches/1.0.x/share/www/script/couch.js [utf-8] Thu Nov 18 13:27:21 2010
@@ -22,17 +22,17 @@ function CouchDB(name, httpHeaders) {
   this.last_req = null;
 
   this.request = function(method, uri, requestOptions) {
-    requestOptions = requestOptions || {}
-    requestOptions.headers = combine(requestOptions.headers, httpHeaders)
+    requestOptions = requestOptions || {};
+    requestOptions.headers = combine(requestOptions.headers, httpHeaders);
     return CouchDB.request(method, uri, requestOptions);
-  }
+  };
 
   // Creates the database on the server
   this.createDb = function() {
     this.last_req = this.request("PUT", this.uri);
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   // Deletes the database on the server
   this.deleteDb = function() {
@@ -42,7 +42,7 @@ function CouchDB(name, httpHeaders) {
     }
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   // Save a document to the database
   this.save = function(doc, options) {
@@ -57,7 +57,7 @@ function CouchDB(name, httpHeaders) {
     var result = JSON.parse(this.last_req.responseText);
     doc._rev = result.rev;
     return result;
-  }
+  };
 
   // Open a document from the database
   this.open = function(docId, options) {
@@ -68,7 +68,7 @@ function CouchDB(name, httpHeaders) {
     }
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   // Deletes a document from the database
   this.deleteDoc = function(doc) {
@@ -79,7 +79,7 @@ function CouchDB(name, httpHeaders) {
     doc._rev = result.rev; //record rev in input document
     doc._deleted = true;
     return result;
-  }
+  };
 
   // Deletes an attachment from a document
   this.deleteDocAttachment = function(doc, attachment_name) {
@@ -89,18 +89,18 @@ function CouchDB(name, httpHeaders) {
     var result = JSON.parse(this.last_req.responseText);
     doc._rev = result.rev; //record rev in input document
     return result;
-  }
+  };
 
   this.bulkSave = function(docs, options) {
     // first prepoulate the UUIDs for new documents
-    var newCount = 0
+    var newCount = 0;
     for (var i=0; i<docs.length; i++) {
       if (docs[i]._id == undefined) {
         newCount++;
       }
     }
     var newUuids = CouchDB.newUuids(docs.length);
-    var newCount = 0
+    var newCount = 0;
     for (var i=0; i<docs.length; i++) {
       if (docs[i]._id == undefined) {
         docs[i]._id = newUuids.pop();
@@ -127,13 +127,13 @@ function CouchDB(name, httpHeaders) {
       }
       return results;
     }
-  }
+  };
 
   this.ensureFullCommit = function() {
     this.last_req = this.request("POST", this.uri + "_ensure_full_commit");
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   // Applies the map function to the contents of database and returns the results.
   this.query = function(mapFun, reduceFun, options, keys, language) {
@@ -163,7 +163,7 @@ function CouchDB(name, httpHeaders) {
     });
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   this.view = function(viewname, options, keys) {
     var viewParts = viewname.split('/');
@@ -182,21 +182,21 @@ function CouchDB(name, httpHeaders) {
     }
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   // gets information about the database
   this.info = function() {
     this.last_req = this.request("GET", this.uri);
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   // gets information about a design doc
   this.designInfo = function(docid) {
     this.last_req = this.request("GET", this.uri + docid + "/_info");
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   this.allDocs = function(options,keys) {
     if(!keys) {
@@ -211,7 +211,7 @@ function CouchDB(name, httpHeaders) {
     }
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   this.designDocs = function() {
     return this.allDocs({startkey:"_design", endkey:"_design0"});
@@ -222,19 +222,19 @@ function CouchDB(name, httpHeaders) {
       + encodeOptions(options));
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   this.compact = function() {
     this.last_req = this.request("POST", this.uri + "_compact");
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   this.viewCleanup = function() {
     this.last_req = this.request("POST", this.uri + "_view_cleanup");
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   this.setDbProperty = function(propId, propValue) {
     this.last_req = this.request("PUT", this.uri + propId,{
@@ -242,13 +242,13 @@ function CouchDB(name, httpHeaders) {
     });
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   this.getDbProperty = function(propId) {
     this.last_req = this.request("GET", this.uri + propId);
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   this.setSecObj = function(secObj) {
     this.last_req = this.request("PUT", this.uri + "_security",{
@@ -256,21 +256,21 @@ function CouchDB(name, httpHeaders) {
     });
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   this.getSecObj = function() {
     this.last_req = this.request("GET", this.uri + "_security");
     CouchDB.maybeThrowError(this.last_req);
     return JSON.parse(this.last_req.responseText);
-  }
+  };
 
   // Convert a options object to an url query string.
   // ex: {key:'value',key2:'value2'} becomes '?key="value"&key2="value2"'
   function encodeOptions(options) {
-    var buf = []
+    var buf = [];
     if (typeof(options) == "object" && options !== null) {
       for (var name in options) {
-        if (!options.hasOwnProperty(name)) { continue };
+        if (!options.hasOwnProperty(name)) { continue; };
         var value = options[name];
         if (name == "key" || name == "startkey" || name == "endkey") {
           value = toJSON(value);
@@ -318,7 +318,7 @@ CouchDB.login = function(name, password)
       + encodeURIComponent(password)
   });
   return JSON.parse(CouchDB.last_req.responseText);
-}
+};
 
 CouchDB.logout = function() {
   CouchDB.last_req = CouchDB.request("DELETE", "/_session", {
@@ -326,7 +326,7 @@ CouchDB.logout = function() {
       "X-CouchDB-WWW-Authenticate": "Cookie"}
   });
   return JSON.parse(CouchDB.last_req.responseText);
-}
+};
 
 CouchDB.session = function(options) {
   options = options || {};
@@ -346,7 +346,7 @@ CouchDB.prepareUserDoc = function(user_d
   }
   user_doc.type = "user";
   if (!user_doc.roles) {
-    user_doc.roles = []
+    user_doc.roles = [];
   }
   return user_doc;
 };
@@ -370,7 +370,7 @@ CouchDB.getVersion = function() {
   CouchDB.last_req = CouchDB.request("GET", "/");
   CouchDB.maybeThrowError(CouchDB.last_req);
   return JSON.parse(CouchDB.last_req.responseText).version;
-}
+};
 
 CouchDB.replicate = function(source, target, rep_options) {
   rep_options = rep_options || {};
@@ -384,7 +384,7 @@ CouchDB.replicate = function(source, tar
   });
   CouchDB.maybeThrowError(CouchDB.last_req);
   return JSON.parse(CouchDB.last_req.responseText);
-}
+};
 
 CouchDB.newXhr = function() {
   if (typeof(XMLHttpRequest) != "undefined") {
@@ -394,16 +394,16 @@ CouchDB.newXhr = function() {
   } else {
     throw new Error("No XMLHTTPRequest support detected");
   }
-}
+};
 
 CouchDB.request = function(method, uri, options) {
-  options = options || {};
-  options.headers = options.headers || {};
+  options = typeof(options) == 'object' ? options : {};
+  options.headers = typeof(options.headers) == 'object' ? options.headers : {};
   options.headers["Content-Type"] = options.headers["Content-Type"] || options.headers["content-type"] || "application/json";
   options.headers["Accept"] = options.headers["Accept"] || options.headers["accept"] || "application/json";
   var req = CouchDB.newXhr();
   if(uri.substr(0, "http://".length) != "http://") {
-    uri = CouchDB.urlPrefix + uri
+    uri = CouchDB.urlPrefix + uri;
   }
   req.open(method, uri, false);
   if (options.headers) {
@@ -415,7 +415,7 @@ CouchDB.request = function(method, uri, 
   }
   req.send(options.body || "");
   return req;
-}
+};
 
 CouchDB.requestStats = function(module, key, test) {
   var query_arg = "";
@@ -426,7 +426,7 @@ CouchDB.requestStats = function(module, 
   var url = "/_stats/" + module + "/" + key + query_arg;
   var stat = CouchDB.request("GET", url).responseText;
   return JSON.parse(stat)[module][key];
-}
+};
 
 CouchDB.uuids_cache = [];
 
@@ -449,7 +449,7 @@ CouchDB.newUuids = function(n, buf) {
         CouchDB.uuids_cache.concat(result.uuids.slice(0, buf));
     return result.uuids.slice(buf);
   }
-}
+};
 
 CouchDB.maybeThrowError = function(req) {
   if (req.status >= 400) {
@@ -460,7 +460,7 @@ CouchDB.maybeThrowError = function(req) 
     }
     throw result;
   }
-}
+};
 
 CouchDB.params = function(options) {
   options = options || {};

Modified: couchdb/branches/1.0.x/share/www/script/couch_test_runner.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/couch_test_runner.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/couch_test_runner.js (original)
+++ couchdb/branches/1.0.x/share/www/script/couch_test_runner.js Thu Nov 18 13:27:21 2010
@@ -28,7 +28,7 @@ function patchTest(fun) {
   var source = fun.toString();
   var output = "";
   var i = 0;
-  var testMarker = "T("
+  var testMarker = "T(";
   while (i < source.length) {
     var testStart = source.indexOf(testMarker, i);
     if (testStart == -1) {
@@ -239,13 +239,13 @@ function saveTestReport(report) {
       $.couch.info({success : function(node_info) {
         report.node = node_info;
         db.saveDoc(report);        
-      }})
+      }});
     };
     var createDb = function() {
       db.create({success: function() {
         db.info({success:saveReport});        
       }});    
-    }
+    };
     db.info({error: createDb, success:saveReport});
   }
 };
@@ -309,7 +309,7 @@ function T(arg1, arg2, testName) {
         .find("code").text(message).end()
         .appendTo($("td.details ol", currentRow));
     }
-    numFailures += 1
+    numFailures += 1;
   }
 }
 
@@ -318,6 +318,11 @@ function TEquals(expected, actual, testN
     "', got '" + repr(actual) + "'", testName);
 }
 
+function TEqualsIgnoreCase(expected, actual, testName) {
+  T(equals(expected.toUpperCase(), actual.toUpperCase()), "expected '" + repr(expected) +
+    "', got '" + repr(actual) + "'", testName);
+}
+
 function equals(a,b) {
   if (a === b) return true;
   try {
@@ -338,18 +343,18 @@ function repr(val) {
 }
 
 function makeDocs(start, end, templateDoc) {
-  var templateDocSrc = templateDoc ? JSON.stringify(templateDoc) : "{}"
+  var templateDocSrc = templateDoc ? JSON.stringify(templateDoc) : "{}";
   if (end === undefined) {
     end = start;
     start = 0;
   }
-  var docs = []
+  var docs = [];
   for (var i = start; i < end; i++) {
     var newDoc = eval("(" + templateDocSrc + ")");
     newDoc._id = (i).toString();
     newDoc.integer = i;
     newDoc.string = (i).toString();
-    docs.push(newDoc)
+    docs.push(newDoc);
   }
   return docs;
 }

Modified: couchdb/branches/1.0.x/share/www/script/jquery.couch.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/jquery.couch.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/jquery.couch.js [utf-8] (original)
+++ couchdb/branches/1.0.x/share/www/script/jquery.couch.js [utf-8] Thu Nov 18 13:27:21 2010
@@ -36,7 +36,7 @@
     }
     user_doc.type = "user";
     if (!user_doc.roles) {
-      user_doc.roles = []
+      user_doc.roles = [];
     }
     return user_doc;
   };
@@ -75,7 +75,7 @@
         req.type = "PUT";
         req.data = toJSON(value);
         req.contentType = "application/json";
-        req.processData = false
+        req.processData = false;
       }
 
       ajax(req, options,
@@ -115,7 +115,7 @@
       user_doc = prepareUserDoc(user_doc, password);
       $.couch.userDb(function(db) {
         db.saveDoc(user_doc, options);
-      })
+      });
     },
     
     login: function(options) {
@@ -167,7 +167,7 @@
             doc._attachments["rev-"+doc._rev.split("-")[0]] = {
               content_type :"application/json",
               data : Base64.encode(rawDocs[doc._id].raw)
-            }
+            };
             return true;
           }
         }
@@ -583,7 +583,7 @@
       if (!uuidCache.length) {
         ajax({url: this.urlPrefix + "/_uuids", data: {count: cacheNum}, async: false}, {
             success: function(resp) {
-              uuidCache = resp.uuids
+              uuidCache = resp.uuids;
             }
           },
           "Failed to retrieve UUID batch."

Modified: couchdb/branches/1.0.x/share/www/script/test/attachment_names.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/attachment_names.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/attachment_names.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/attachment_names.js Thu Nov 18 13:27:21 2010
@@ -24,7 +24,7 @@ couchTests.attachment_names = function(d
         data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
       }
     }
-  }
+  };
 
   // inline attachments
   try {
@@ -72,7 +72,7 @@ couchTests.attachment_names = function(d
         data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
       }
     }
-  }
+  };
 
   try {
     db.save(binAttDoc);

Modified: couchdb/branches/1.0.x/share/www/script/test/attachment_paths.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/attachment_paths.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/attachment_paths.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/attachment_paths.js Thu Nov 18 13:27:21 2010
@@ -33,7 +33,7 @@ couchTests.attachment_paths = function(d
           data: "V2UgbGlrZSBwZXJjZW50IHR3byBGLg=="
         }
       }
-    }
+    };
 
     T(db.save(binAttDoc).ok);
 
@@ -73,7 +73,10 @@ couchTests.attachment_paths = function(d
     T(binAttDoc._attachments["foo/bar.txt"] !== undefined);
     T(binAttDoc._attachments["foo%2Fbaz.txt"] !== undefined);
     T(binAttDoc._attachments["foo/bar2.txt"] !== undefined);
-    T(binAttDoc._attachments["foo/bar2.txt"].content_type == "text/plain;charset=utf-8");
+    TEquals("text/plain;charset=utf-8",                   // thank you Safari
+      binAttDoc._attachments["foo/bar2.txt"].content_type.toLowerCase(),
+      "correct content-type"
+    );
     T(binAttDoc._attachments["foo/bar2.txt"].length == 30);
 
     //// now repeat the while thing with a design doc
@@ -92,7 +95,7 @@ couchTests.attachment_paths = function(d
           data: "V2UgbGlrZSBwZXJjZW50IHR3byBGLg=="
         }
       }
-    }
+    };
 
     T(db.save(binAttDoc).ok);
 
@@ -141,7 +144,10 @@ couchTests.attachment_paths = function(d
 
     T(binAttDoc._attachments["foo/bar.txt"] !== undefined);
     T(binAttDoc._attachments["foo/bar2.txt"] !== undefined);
-    T(binAttDoc._attachments["foo/bar2.txt"].content_type == "text/plain;charset=utf-8");
+    TEquals("text/plain;charset=utf-8",                   // thank you Safari
+      binAttDoc._attachments["foo/bar2.txt"].content_type.toLowerCase(),
+      "correct content-type"
+    );
     T(binAttDoc._attachments["foo/bar2.txt"].length == 30);
   }
 };

Modified: couchdb/branches/1.0.x/share/www/script/test/attachment_views.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/attachment_views.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/attachment_views.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/attachment_views.js Thu Nov 18 13:27:21 2010
@@ -68,11 +68,11 @@ couchTests.attachment_views= function(de
     }
 
     emit(parseInt(doc._id), count);
-  }
+  };
 
   var reduceFunction = function(key, values) {
     return sum(values);
-  }
+  };
 
   var result = db.query(mapFunction, reduceFunction);
 

Modified: couchdb/branches/1.0.x/share/www/script/test/attachments.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/attachments.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/attachments.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/attachments.js Thu Nov 18 13:27:21 2010
@@ -24,7 +24,7 @@ couchTests.attachments= function(debug) 
         data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
       }
     }
-  }
+  };
 
   var save_response = db.save(binAttDoc);
   T(save_response.ok);
@@ -43,7 +43,7 @@ couchTests.attachments= function(debug) 
         data: ""
       }
     }
-  }
+  };
 
   T(db.save(binAttDoc2).ok);
 
@@ -68,12 +68,12 @@ couchTests.attachments= function(debug) 
 
   T(binAttDoc2._attachments["foo.txt"] !== undefined);
   T(binAttDoc2._attachments["foo2.txt"] !== undefined);
-  T(binAttDoc2._attachments["foo2.txt"].content_type == "text/plain;charset=utf-8");
+  TEqualsIgnoreCase("text/plain;charset=utf-8", binAttDoc2._attachments["foo2.txt"].content_type);
   T(binAttDoc2._attachments["foo2.txt"].length == 30);
 
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc2/foo2.txt");
   T(xhr.responseText == "This is no base64 encoded text");
-  T(xhr.getResponseHeader("Content-Type") == "text/plain;charset=utf-8");
+  TEqualsIgnoreCase("text/plain;charset=utf-8", xhr.getResponseHeader("Content-Type"));
 
   // test without rev, should fail
   var xhr = CouchDB.request("DELETE", "/test_suite_db/bin_doc2/foo2.txt");
@@ -96,7 +96,7 @@ couchTests.attachments= function(debug) 
 
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc3/attachment.txt");
   T(xhr.responseText == bin_data);
-  T(xhr.getResponseHeader("Content-Type") == "text/plain;charset=utf-8");
+  TEqualsIgnoreCase("text/plain;charset=utf-8", xhr.getResponseHeader("Content-Type"));
 
   var xhr = CouchDB.request("PUT", "/test_suite_db/bin_doc3/attachment.txt", {
     headers:{"Content-Type":"text/plain;charset=utf-8"},
@@ -113,11 +113,11 @@ couchTests.attachments= function(debug) 
 
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc3/attachment.txt");
   T(xhr.responseText == bin_data);
-  T(xhr.getResponseHeader("Content-Type") == "text/plain;charset=utf-8");
+  TEqualsIgnoreCase("text/plain;charset=utf-8", xhr.getResponseHeader("Content-Type"));
 
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc3/attachment.txt?rev=" + rev);
   T(xhr.responseText == bin_data);
-  T(xhr.getResponseHeader("Content-Type") == "text/plain;charset=utf-8");
+  TEqualsIgnoreCase("text/plain;charset=utf-8", xhr.getResponseHeader("Content-Type"));
 
   var xhr = CouchDB.request("DELETE", "/test_suite_db/bin_doc3/attachment.txt?rev=" + rev);
   T(xhr.status == 200);
@@ -129,7 +129,7 @@ couchTests.attachments= function(debug) 
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc3/attachment.txt?rev=" + rev);
   T(xhr.status == 200);
   T(xhr.responseText == bin_data);
-  T(xhr.getResponseHeader("Content-Type") == "text/plain;charset=utf-8");
+  TEqualsIgnoreCase("text/plain;charset=utf-8", xhr.getResponseHeader("Content-Type"));
 
   // empty attachments
   var xhr = CouchDB.request("PUT", "/test_suite_db/bin_doc4/attachment.txt", {
@@ -156,7 +156,7 @@ couchTests.attachments= function(debug) 
 
   // Attachment sparseness COUCHDB-220
 
-  var docs = []
+  var docs = [];
   for (var i = 0; i < 5; i++) {
     var doc = {
       _id: (i).toString(),
@@ -166,8 +166,8 @@ couchTests.attachments= function(debug) 
           data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
         }
       }
-    }
-    docs.push(doc)
+    };
+    docs.push(doc);
   }
 
   var saved = db.bulkSave(docs);
@@ -210,7 +210,7 @@ couchTests.attachments= function(debug) 
 
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc5/lorem.txt");
   T(xhr.responseText == lorem);
-  T(xhr.getResponseHeader("Content-Type") == "text/plain;charset=utf-8");
+  TEqualsIgnoreCase("text/plain;charset=utf-8", xhr.getResponseHeader("Content-Type"));
 
   // test large inline attachment too
   var lorem_b64 = CouchDB.request("GET", "/_utils/script/test/lorem_b64.txt").responseText;
@@ -254,7 +254,7 @@ couchTests.attachments= function(debug) 
         data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
       }
     }
-  }
+  };
   T(db.save(bin_doc6).ok);
   // stub out the attachment
   bin_doc6._attachments["foo.txt"] = { stub: true };
@@ -268,6 +268,6 @@ couchTests.attachments= function(debug) 
       T(db.save(bin_doc6).ok == true);
       T(false && "Shouldn't get here!");
   } catch (e) {
-      T(e.error == "missing_stub")
+      T(e.error == "missing_stub");
   }
 };

Modified: couchdb/branches/1.0.x/share/www/script/test/attachments_multipart.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/attachments_multipart.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/attachments_multipart.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/attachments_multipart.js Thu Nov 18 13:27:21 2010
@@ -58,7 +58,7 @@ couchTests.attachments_multipart= functi
     
   var result = JSON.parse(xhr.responseText);
   
-  T(result.ok)
+  T(result.ok);
   
   
     

Modified: couchdb/branches/1.0.x/share/www/script/test/basics.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/basics.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/basics.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/basics.js Thu Nov 18 13:27:21 2010
@@ -45,7 +45,7 @@ couchTests.basics = function(debug) {
 
   // Get the database info, check the db_name
   T(db.info().db_name == "test_suite_db");
-  T(CouchDB.allDbs().indexOf("test_suite_db") != -1)
+  T(CouchDB.allDbs().indexOf("test_suite_db") != -1);
 
   // Get the database info, check the doc_count
   T(db.info().doc_count == 0);
@@ -91,13 +91,13 @@ couchTests.basics = function(debug) {
       emit(null, doc.b);
   };
 
-  results = db.query(mapFunction);
+  var results = db.query(mapFunction);
 
   // verify only one document found and the result value (doc.b).
   T(results.total_rows == 1 && results.rows[0].value == 16);
 
   // reopen document we saved earlier
-  existingDoc = db.open(id);
+  var existingDoc = db.open(id);
 
   T(existingDoc.a==1);
 
@@ -191,12 +191,12 @@ couchTests.basics = function(debug) {
   T(xhr.status == 404);
 
   // Check for invalid document members
-  bad_docs = [
+  var bad_docs = [
     ["goldfish", {"_zing": 4}],
     ["zebrafish", {"_zoom": "hello"}],
     ["mudfish", {"zane": "goldfish", "_fan": "something smells delicious"}],
     ["tastyfish", {"_bing": {"wha?": "soda can"}}]
-  ]
+  ];
   var test_doc = function(info) {
   var data = JSON.stringify(info[1]);
     xhr = CouchDB.request("PUT", "/test_suite_db/" + info[0], {body: data});

Modified: couchdb/branches/1.0.x/share/www/script/test/bulk_docs.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/bulk_docs.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/bulk_docs.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/bulk_docs.js Thu Nov 18 13:27:21 2010
@@ -51,12 +51,12 @@ couchTests.bulk_docs = function(debug) {
   T(results.length == 5);
   T(results[0].id == "0");
   T(results[0].error == "conflict");
-  T(results[0].rev === undefined); // no rev member when a conflict
+  T(typeof results[0].rev === "undefined"); // no rev member when a conflict
 
   // but the rest are not
   for (i = 1; i < 5; i++) {
     T(results[i].id == i.toString());
-    T(results[i].rev)
+    T(results[i].rev);
     T(db.open(docs[i]._id) == null);
   }
 
@@ -64,7 +64,7 @@ couchTests.bulk_docs = function(debug) {
 
   // save doc 0, this will cause a conflict when we save docs[0]
   var doc = db.open("0");
-  docs[0] = db.open("0")
+  docs[0] = db.open("0");
   db.save(doc);
 
   docs[0].shooby = "dooby";
@@ -93,8 +93,8 @@ couchTests.bulk_docs = function(debug) {
   // Regression test for failure on update/delete
   var newdoc = {"_id": "foobar", "body": "baz"};
   T(db.save(newdoc).ok);
-  update = {"_id": newdoc._id, "_rev": newdoc._rev, "body": "blam"};
-  torem = {"_id": newdoc._id, "_rev": newdoc._rev, "_deleted": true};
+  var update = {"_id": newdoc._id, "_rev": newdoc._rev, "body": "blam"};
+  var torem = {"_id": newdoc._id, "_rev": newdoc._rev, "_deleted": true};
   results = db.bulkSave([update, torem]);
   T(results[0].error == "conflict" || results[1].error == "conflict");
 };

Modified: couchdb/branches/1.0.x/share/www/script/test/compact.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/compact.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/compact.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/compact.js Thu Nov 18 13:27:21 2010
@@ -26,7 +26,7 @@ couchTests.compact = function(debug) {
         data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
       }
     }
-  }
+  };
 
   T(db.save(binAttDoc).ok);
 
@@ -51,8 +51,8 @@ couchTests.compact = function(debug) {
   T(db.ensureFullCommit().ok);
   restartServer();
   var xhr = CouchDB.request("GET", "/test_suite_db/bin_doc/foo.txt");
-  T(xhr.responseText == "This is a base64 encoded text")
-  T(xhr.getResponseHeader("Content-Type") == "text/plain")
+  T(xhr.responseText == "This is a base64 encoded text");
+  T(xhr.getResponseHeader("Content-Type") == "text/plain");
   T(db.info().doc_count == 1);
   T(db.info().disk_size < deletesize);
 

Modified: couchdb/branches/1.0.x/share/www/script/test/conflicts.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/conflicts.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/conflicts.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/conflicts.js Thu Nov 18 13:27:21 2010
@@ -44,7 +44,7 @@ couchTests.conflicts = function(debug) {
 
   var changes = db.changes();
 
-  T( changes.results.length == 1)
+  T(changes.results.length == 1);
 
   // Now clear out the _rev member and save. This indicates this document is
   // new, not based on an existing revision.

Modified: couchdb/branches/1.0.x/share/www/script/test/cookie_auth.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/cookie_auth.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/cookie_auth.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/cookie_auth.js Thu Nov 18 13:27:21 2010
@@ -65,7 +65,7 @@ couchTests.cookie_auth = function(debug)
       }, "eh, Boo-Boo?");
 
       try {
-        usersDb.save(duplicateJchrisDoc)
+        usersDb.save(duplicateJchrisDoc);
         T(false && "Can't create duplicate user names. Should have thrown an error.");
       } catch (e) {
         T(e.error == "conflict");
@@ -78,7 +78,7 @@ couchTests.cookie_auth = function(debug)
       }, "copperfield");
 
       try {
-        usersDb.save(underscoreUserDoc)
+        usersDb.save(underscoreUserDoc);
         T(false && "Can't create underscore user names. Should have thrown an error.");
       } catch (e) {
         T(e.error == "forbidden");
@@ -93,7 +93,7 @@ couchTests.cookie_auth = function(debug)
       badIdDoc._id = "org.apache.couchdb:w00x";
 
       try {
-        usersDb.save(badIdDoc)
+        usersDb.save(badIdDoc);
         T(false && "Can't create malformed docids. Should have thrown an error.");
       } catch (e) {
         T(e.error == "forbidden");
@@ -125,7 +125,7 @@ couchTests.cookie_auth = function(debug)
        T(CouchDB.session().userCtx.name != 'Jason Davies');
 
        // test redirect
-       xhr = CouchDB.request("POST", "/_session?next=/", {
+       var xhr = CouchDB.request("POST", "/_session?next=/", {
          headers: {"Content-Type": "application/x-www-form-urlencoded"},
          body: "name=Jason%20Davies&password="+encodeURIComponent(password)
        });
@@ -135,10 +135,10 @@ couchTests.cookie_auth = function(debug)
        // to follow the redirect, ie, the browser follows and does a
        // GET on the returned Location
        if (xhr.status == 200) {
-         T(/Welcome/.test(xhr.responseText))
+         T(/Welcome/.test(xhr.responseText));
        } else {
-         T(xhr.status == 302)
-         T(xhr.getResponseHeader("Location"))
+         T(xhr.status == 302);
+         T(xhr.getResponseHeader("Location"));
        }
 
       // test users db validations
@@ -151,7 +151,7 @@ couchTests.cookie_auth = function(debug)
       jasonUserDoc.foo=3;
 
       try {
-        usersDb.save(jasonUserDoc)
+        usersDb.save(jasonUserDoc);
         T(false && "Can't update someone else's user doc. Should have thrown an error.");
       } catch (e) {
         T(e.error == "forbidden");
@@ -162,7 +162,7 @@ couchTests.cookie_auth = function(debug)
       jchrisUserDoc.roles = ["foo"];
       
       try {
-        usersDb.save(jchrisUserDoc)
+        usersDb.save(jchrisUserDoc);
         T(false && "Can't set roles unless you are admin. Should have thrown an error.");
       } catch (e) {
         T(e.error == "forbidden");
@@ -179,7 +179,7 @@ couchTests.cookie_auth = function(debug)
       jchrisUserDoc.roles = ["_bar"];
       
       try {
-        usersDb.save(jchrisUserDoc)
+        usersDb.save(jchrisUserDoc);
         T(false && "Can't add system roles to user's db. Should have thrown an error.");
       } catch (e) {
         T(e.error == "forbidden");

Modified: couchdb/branches/1.0.x/share/www/script/test/erlang_views.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/erlang_views.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/erlang_views.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/erlang_views.js Thu Nov 18 13:27:21 2010
@@ -44,7 +44,7 @@ couchTests.erlang_views = function(debug
       // check simple reduction - another doc with same key.
       var doc = {_id: "2", integer: 1, string: "str2"};
       T(db.save(doc).ok);
-      rfun = "fun(Keys, Values, ReReduce) -> length(Values) end."
+      rfun = "fun(Keys, Values, ReReduce) -> length(Values) end.";
       results = db.query(mfun, rfun, null, null, "erlang");
       T(results.rows[0].value == 2);
 

Modified: couchdb/branches/1.0.x/share/www/script/test/etags_views.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/etags_views.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/etags_views.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/etags_views.js Thu Nov 18 13:27:21 2010
@@ -38,7 +38,7 @@ couchTests.etags_views = function(debug)
         })
       }
     }
-  }
+  };
   T(db.save(designDoc).ok);
   var xhr;
   var docs = makeDocs(0, 10);

Modified: couchdb/branches/1.0.x/share/www/script/test/list_views.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/list_views.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/list_views.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/list_views.js Thu Nov 18 13:27:21 2010
@@ -394,7 +394,7 @@ couchTests.list_views = function(debug) 
   T(/LastKey: 0/.test(xhr.responseText));
 
   // Test we do multi-key requests on lists and views in separate docs.
-  var url = "/test_suite_db/_design/lists/_list/simpleForm/views/basicView"
+  var url = "/test_suite_db/_design/lists/_list/simpleForm/views/basicView";
   xhr = CouchDB.request("POST", url, {
     body: '{"keys":[-2,-4,-5,-7]}'
   });

Modified: couchdb/branches/1.0.x/share/www/script/test/method_override.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/method_override.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/method_override.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/method_override.js Thu Nov 18 13:27:21 2010
@@ -28,7 +28,7 @@ couchTests.method_override = function(de
   T(doc.bob == "connie");
 
   xhr = CouchDB.request("POST", "/test_suite_db/fnord?rev=" + doc._rev, {headers:{"X-HTTP-Method-Override" : "DELETE"}});
-  T(xhr.status == 200)
+  T(xhr.status == 200);
 
   xhr = CouchDB.request("GET", "/test_suite_db/fnord2", {body: JSON.stringify(doc), headers:{"X-HTTP-Method-Override" : "PUT"}});
   // Method Override is ignored when original Method isn't POST

Modified: couchdb/branches/1.0.x/share/www/script/test/proxyauth.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/proxyauth.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/proxyauth.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/proxyauth.js Thu Nov 18 13:27:21 2010
@@ -39,7 +39,7 @@ couchTests.proxyauth = function(debug) {
     db.createDb();
     
     var benoitcUserDoc = CouchDB.prepareUserDoc({
-      name: "benoitc@apache.org", 
+      name: "benoitc@apache.org"
     }, "test");
     T(usersDb.save(benoitcUserDoc).ok);
     
@@ -56,7 +56,7 @@ couchTests.proxyauth = function(debug) {
     
     CouchDB.logout();
     
-    headers = {
+    var headers = {
       "X-Auth-CouchDB-UserName": "benoitc@apache.org",
       "X-Auth-CouchDB-Roles": "test",
       "X-Auth-CouchDB-Token": hex_hmac_sha1(secret, "benoitc@apache.org")
@@ -72,14 +72,13 @@ couchTests.proxyauth = function(debug) {
         }),
         "role": stringFun(function(doc, req) {
           return req.userCtx['roles'][0];
-        }),
+        })
       }
-      
-    }
+    };
 
     db.save(designDoc);
     
-    req = CouchDB.request("GET", "/test_suite_db/_design/test/_show/welcome",
+    var req = CouchDB.request("GET", "/test_suite_db/_design/test/_show/welcome",
                         {headers: headers});
     T(req.responseText == "Welcome benoitc@apache.org");
     
@@ -87,7 +86,7 @@ couchTests.proxyauth = function(debug) {
                         {headers: headers});
     T(req.responseText == "test");
     
-    xhr = CouchDB.request("PUT", "/_config/couch_httpd_auth/proxy_use_secret",{
+    var xhr = CouchDB.request("PUT", "/_config/couch_httpd_auth/proxy_use_secret",{
       body : JSON.stringify("true"),
       headers: {"X-Couch-Persist": "false"}
     });

Modified: couchdb/branches/1.0.x/share/www/script/test/purge.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/purge.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/purge.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/purge.js Thu Nov 18 13:27:21 2010
@@ -30,7 +30,7 @@ couchTests.purge = function(debug) {
       all_docs_twice: {map: "function(doc) { emit(doc.integer, null); emit(doc.integer, null) }"},
       single_doc: {map: "function(doc) { if (doc._id == \"1\") { emit(1, null) }}"}
     }
-  }
+  };
 
   T(db.save(designDoc).ok);
 
@@ -50,7 +50,7 @@ couchTests.purge = function(debug) {
 
   // purge the documents
   var xhr = CouchDB.request("POST", "/test_suite_db/_purge", {
-    body: JSON.stringify({"1":[doc1._rev], "2":[doc2._rev]}),
+    body: JSON.stringify({"1":[doc1._rev], "2":[doc2._rev]})
   });
   T(xhr.status == 200);
 
@@ -83,13 +83,13 @@ couchTests.purge = function(debug) {
   var doc4 = db.open("4");
 
   xhr = CouchDB.request("POST", "/test_suite_db/_purge", {
-    body: JSON.stringify({"3":[doc3._rev]}),
+    body: JSON.stringify({"3":[doc3._rev]})
   });
 
   T(xhr.status == 200);
 
   xhr = CouchDB.request("POST", "/test_suite_db/_purge", {
-    body: JSON.stringify({"4":[doc4._rev]}),
+    body: JSON.stringify({"4":[doc4._rev]})
   });
 
   T(xhr.status == 200);

Modified: couchdb/branches/1.0.x/share/www/script/test/recreate_doc.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/recreate_doc.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/recreate_doc.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/recreate_doc.js Thu Nov 18 13:27:21 2010
@@ -51,7 +51,7 @@ couchTests.recreate_doc = function(debug
         data: "VGhpcyBpcyBhIGJhc2U2NCBlbmNvZGVkIHRleHQ="
       }
     }
-  }
+  };
   try {
     // same as before, but with binary
     db.save(binAttDoc);

Modified: couchdb/branches/1.0.x/share/www/script/test/reduce.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/reduce.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/reduce.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/reduce.js Thu Nov 18 13:27:21 2010
@@ -15,14 +15,15 @@ couchTests.reduce = function(debug) {
   db.deleteDb();
   db.createDb();
   if (debug) debugger;
-  var numDocs = 500
+  var numDocs = 500;
   var docs = makeDocs(1,numDocs + 1);
   db.bulkSave(docs);
   var summate = function(N) {return (N+1)*N/2;};
 
   var map = function (doc) {
       emit(doc.integer, doc.integer);
-      emit(doc.integer, doc.integer)};
+      emit(doc.integer, doc.integer);
+  };
   var reduce = function (keys, values) { return sum(values); };
   var result = db.query(map, reduce);
   T(result.rows[0].value == 2*summate(numDocs));
@@ -69,7 +70,7 @@ couchTests.reduce = function(debug) {
       T(db.info().doc_count == ((i - 1) * 10 * 11) + ((j + 1) * 11));
     }
 
-    map = function (doc) {emit(doc.keys, 1)};
+    map = function (doc) { emit(doc.keys, 1); };
     reduce = function (keys, values) { return sum(values); };
 
     var results = db.query(map, reduce, {group:true});
@@ -107,7 +108,7 @@ couchTests.reduce = function(debug) {
   db.createDb();
 
 
-  var map = function (doc) {emit(doc.val, doc.val)};
+  var map = function (doc) { emit(doc.val, doc.val); };
   var reduceCombine = function (keys, values, rereduce) {
       // This computes the standard deviation of the mapped results
       var stdDeviation=0.0;

Modified: couchdb/branches/1.0.x/share/www/script/test/reduce_builtin.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/reduce_builtin.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/reduce_builtin.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/reduce_builtin.js Thu Nov 18 13:27:21 2010
@@ -16,7 +16,7 @@ couchTests.reduce_builtin = function(deb
   db.createDb();
   if (debug) debugger;
 
-  var numDocs = 500
+  var numDocs = 500;
   var docs = makeDocs(1,numDocs + 1);
   db.bulkSave(docs);
 
@@ -28,13 +28,14 @@ couchTests.reduce_builtin = function(deb
       acc += i*i;
     }
     return acc;
-  }
+  };
 
   // this is the same test as the reduce.js test
   // only we'll let CouchDB run reduce in Erlang
   var map = function (doc) {
       emit(doc.integer, doc.integer);
-      emit(doc.integer, doc.integer)};
+      emit(doc.integer, doc.integer);
+  };
 
   var result = db.query(map, "_sum");
   T(result.rows[0].value == 2*summate(numDocs));
@@ -115,7 +116,7 @@ couchTests.reduce_builtin = function(deb
       T(db.info().doc_count == ((i - 1) * 10 * 11) + ((j + 1) * 11));
     }
 
-    map = function (doc) {emit(doc.keys, 1)};
+    map = function (doc) { emit(doc.keys, 1); };
     // with emitted values being 1, count should be the same as sum
     var builtins = ["_sum", "_count"];
 

Modified: couchdb/branches/1.0.x/share/www/script/test/stats.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/stats.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/stats.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/stats.js Thu Nov 18 13:27:21 2010
@@ -30,7 +30,7 @@ couchTests.stats = function(debug) {
       _id:"_design/test", // turn off couch.js id escaping?
       language: "javascript",
       views: {
-        all_docs: {map: "function(doc) {emit(doc.integer, null);}"},
+        all_docs: {map: "function(doc) {emit(doc.integer, null);}"}
       }
     };
     db.save(designDoc);
@@ -163,12 +163,12 @@ couchTests.stats = function(debug) {
       CouchDB.request("POST", "/test_suite_db", {
         headers: {"Content-Type": "application/json"},
         body: '{"a": "1"}'
-      })
+      });
     },
     test: function(before, after) {
       TEquals(before+1, after, "POST'ing new docs increments doc writes.");
     }
-  })
+  });
   
   runTest("couchdb", "database_writes", {
     setup: function(db) {db.save({"_id": "test"});},
@@ -247,7 +247,7 @@ couchTests.stats = function(debug) {
   });
   
   runTest("httpd", "temporary_view_reads", {
-    run: function(db) {db.query(function(doc) {emit(doc._id)})},
+    run: function(db) { db.query(function(doc) { emit(doc._id); }); },
     test: function(before, after) {
       TEquals(before+1, after, "Temporary views have their own counter.");
     }
@@ -261,7 +261,7 @@ couchTests.stats = function(debug) {
   });
   
   runTest("httpd", "view_reads", {
-    run: function(db) {db.query(function(doc) {emit(doc._id)});},
+    run: function(db) { db.query(function(doc) { emit(doc._id); }); },
     test: function(before, after) {
       TEquals(before, after, "Temporary views don't affect permanent views.");
     }

Modified: couchdb/branches/1.0.x/share/www/script/test/view_multi_key_design.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/view_multi_key_design.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/view_multi_key_design.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/view_multi_key_design.js Thu Nov 18 13:27:21 2010
@@ -34,11 +34,11 @@ couchTests.view_multi_key_design = funct
         reduce:"function (keys, values) { return sum(values); };"
       }
     }
-  }
+  };
   T(db.save(designDoc).ok);
 
   // Test that missing keys work too
-  var keys = [101,30,15,37,50]
+  var keys = [101,30,15,37,50];
   var reduce = db.view("test/summate",{group:true},keys).rows;
   T(reduce.length == keys.length-1); // 101 is missing
   for(var i=0; i<reduce.length; i++) {
@@ -81,7 +81,7 @@ couchTests.view_multi_key_design = funct
   }
 
   // Test that a map & reduce containing func support keys when reduce=false
-  resp = db.view("test/summate", {reduce: false}, keys);
+  var resp = db.view("test/summate", {reduce: false}, keys);
   T(resp.rows.length == 5);
 
   // Check that limiting by startkey_docid and endkey_docid get applied

Modified: couchdb/branches/1.0.x/share/www/script/test/view_sandboxing.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/view_sandboxing.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/view_sandboxing.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/view_sandboxing.js Thu Nov 18 13:27:21 2010
@@ -42,11 +42,11 @@ couchTests.view_sandboxing = function(de
 
     // make sure that a view cannot access the map_funs array defined used by
     // the view server
-    var results = db.query(function(doc) { map_funs.push(1); emit(null, doc) });
+    var results = db.query(function(doc) { map_funs.push(1); emit(null, doc); });
     T(results.total_rows == 0);
 
     // make sure that a view cannot access the map_results array defined used by
     // the view server
-    var results = db.query(function(doc) { map_results.push(1); emit(null, doc) });
+    var results = db.query(function(doc) { map_results.push(1); emit(null, doc); });
     T(results.total_rows == 0);
 };

Modified: couchdb/branches/1.0.x/share/www/script/test/view_update_seq.js
URL: http://svn.apache.org/viewvc/couchdb/branches/1.0.x/share/www/script/test/view_update_seq.js?rev=1036449&r1=1036448&r2=1036449&view=diff
==============================================================================
--- couchdb/branches/1.0.x/share/www/script/test/view_update_seq.js (original)
+++ couchdb/branches/1.0.x/share/www/script/test/view_update_seq.js Thu Nov 18 13:27:21 2010
@@ -18,7 +18,7 @@ couchTests.view_update_seq = function(de
 
   T(db.info().update_seq == 0);
 
-  resp = db.allDocs({update_seq:true});
+  var resp = db.allDocs({update_seq:true});
 
   T(resp.rows.length == 0);
   T(resp.update_seq == 0);
@@ -35,7 +35,7 @@ couchTests.view_update_seq = function(de
         reduce:"function (keys, values) { return sum(values); };"
       }
     }
-  }
+  };
   T(db.save(designDoc).ok);
 
   T(db.info().update_seq == 1);



Mime
View raw message