couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nsla...@apache.org
Subject svn commit: r791350 [5/5] - in /couchdb/trunk: etc/couchdb/ share/server/ share/www/ share/www/dialog/ share/www/script/ share/www/script/test/ share/www/style/ src/couchdb/ src/ibrowse/ src/mochiweb/ test/ test/etap/
Date Mon, 06 Jul 2009 00:33:54 GMT
Modified: couchdb/trunk/test/query_server_spec.rb
URL: http://svn.apache.org/viewvc/couchdb/trunk/test/query_server_spec.rb?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/test/query_server_spec.rb (original)
+++ couchdb/trunk/test/query_server_spec.rb Mon Jul  6 00:33:50 2009
@@ -94,7 +94,7 @@
 end
 
 class QueryServerRunner < OSProcessRunner
-  
+
   COMMANDS = {"js" => "#{COUCH_ROOT}/src/couchdb/couchjs #{COUCH_ROOT}/share/server/main.js"
}
 
   def self.run_command
@@ -159,7 +159,7 @@
           var row;
           log("about to getRow " + typeof(getRow));
           while(row = getRow()) {
-            send(row.key);        
+            send(row.key);
           };
           return "tail";
         };
@@ -172,8 +172,8 @@
           var row;
           log("about to getRow " + typeof(getRow));
           while(row = getRow()) {
-            send(row.key);        
-            send("eggs");        
+            send(row.key);
+            send("eggs");
           };
           return "tail";
         };
@@ -186,7 +186,7 @@
           send(req.q);
           var row;
           while(row = getRow()) {
-            send(row.key);    
+            send(row.key);
           };
           return "early";
         };
@@ -199,11 +199,11 @@
           send(req.q);
           var row, i=0;
           while(row = getRow()) {
-            send(row.key);  
+            send(row.key);
             i += 1;
             if (i > 2) {
               return('early tail');
-            }  
+            }
           };
         };
     JS
@@ -221,7 +221,7 @@
           send("bacon")
           var row, i = 0;
           while(row = getRow()) {
-            send(row.key);        
+            send(row.key);
             i += 1;
             if (i > 2) {
               return('early');
@@ -237,7 +237,7 @@
           send(req.q);
           var row;
           while(row = getRow()) {
-            send(row.key);        
+            send(row.key);
           };
           return "tail";
         };
@@ -254,7 +254,7 @@
     @qs.close
   end
   it "should reset" do
-    @qs.run(["reset"]).should == true    
+    @qs.run(["reset"]).should == true
   end
   it "should run map funs" do
     @qs.reset!
@@ -285,7 +285,7 @@
       @qs.run(["rereduce", [@fun], vs]).should == [true, [45]]
     end
   end
-  
+
   # it "should validate"
   describe "validation" do
     before(:all) do
@@ -299,35 +299,35 @@
       @qs.run(["validate", @fun, {"bad" => true}, {}, {}]).should == {"forbidden"=>"bad
doc"}
     end
   end
-  
+
   describe "show" do
     before(:all) do
       @fun = functions["show-simple"][LANGUAGE]
       @qs.reset!
     end
     it "should show" do
-      @qs.rrun(["show", @fun, 
+      @qs.rrun(["show", @fun,
         {:title => "Best ever", :body => "Doc body"}])
       @qs.jsgets.should == ["resp", {"body" => "Best ever - Doc body"}]
     end
   end
-  
+
   describe "show with headers" do
     before(:all) do
       @fun = functions["show-headers"][LANGUAGE]
       @qs.reset!
     end
     it "should show headers" do
-      @qs.rrun(["show", @fun, 
+      @qs.rrun(["show", @fun,
         {:title => "Best ever", :body => "Doc body"}])
       @qs.jsgets.should == ["resp", {"code"=>200,"headers" => {"X-Plankton"=>"Rusty"},
"body" => "Best ever - Doc body"}]
     end
   end
-    
+
 # end
 #                    LIST TESTS
 # __END__
-    
+
   describe "raw list with headers" do
     before(:each) do
       @fun = functions["show-sends"][LANGUAGE]
@@ -341,11 +341,11 @@
       @qs.jsgets.should == ["end", ["tail"]]
     end
   end
-  
+
   describe "list with rows" do
     before(:each) do
       @fun = functions["show-while-get-rows"][LANGUAGE]
-      @qs.run(["reset"]).should == true    
+      @qs.run(["reset"]).should == true
       @qs.add_fun(@fun).should == true
     end
     it "should list em" do
@@ -365,7 +365,7 @@
       @qs.jsgets.should == ["end", ["tail"]]
     end
   end
-  
+
   describe "should buffer multiple chunks sent for a single row." do
     before(:all) do
       @fun = functions["show-while-get-rows-multi-send"][LANGUAGE]
@@ -400,7 +400,7 @@
       @qs.run(["list_end"]).should == ["end" , ["early"]]
     end
   end
-  
+
   describe "only goes to 2 list" do
     before(:all) do
       @fun = functions["list-chunky"][LANGUAGE]
@@ -443,7 +443,7 @@
   after(:each) do
     @qs.close
   end
-  
+
   describe "old style list" do
     before(:each) do
       @fun = functions["list-old-style"][LANGUAGE]
@@ -456,7 +456,7 @@
       resp["reason"].should include("the list API has changed")
     end
   end
-  
+
   describe "only goes to 2 list" do
     before(:each) do
       @fun = functions["list-capped"][LANGUAGE]
@@ -473,7 +473,7 @@
       should_have_exited @qs
     end
   end
-  
+
   describe "raw list" do
     before(:each) do
       @fun = functions["list-raw"][LANGUAGE]
@@ -486,5 +486,5 @@
       @qs.run(["reset"])["error"].should == "query_server_error"
       should_have_exited @qs
     end
-  end  
+  end
 end

Modified: couchdb/trunk/test/test.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/test/test.js?rev=791350&r1=791349&r2=791350&view=diff
==============================================================================
--- couchdb/trunk/test/test.js (original)
+++ couchdb/trunk/test/test.js Mon Jul  6 00:33:50 2009
@@ -56,7 +56,7 @@
     var body = parts.pop();
     var header = parts.pop();
     var headers = header.split(/\n/);
-    
+
     var status = /HTTP\/1.\d (\d*)/.exec(header)[1];
     return {
       responseText: body,
@@ -83,7 +83,7 @@
     HEAD : function(url, body, headers) {
       var st, urx = url, hx = (headers || null);
       st = headhttp(urx, hx);
-      return parseCurl(st);      
+      return parseCurl(st);
     },
     DELETE : function(url, body, headers) {
       var st, urx = url, hx = (headers || null);
@@ -202,7 +202,7 @@
     } else {
       numTests += 1;
       var testFun = couchTests[t];
-      runTestConsole(testFun, debug);      
+      runTestConsole(testFun, debug);
     }
   }
   p("Results: "+numFailures.toString() + " failures in "+numTests+" tests.")



Mime
View raw message