summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--benchmark/http_simple.js4
-rw-r--r--benchmark/http_simple.rb28
-rw-r--r--lib/crypto.js2
-rw-r--r--lib/net.js2
-rw-r--r--lib/readline.js2
-rw-r--r--lib/repl.js16
-rw-r--r--lib/string_decoder.js2
-rw-r--r--src/node.cc2
-rw-r--r--src/node_buffer.cc4
-rw-r--r--src/node_cares.cc2
-rw-r--r--src/node_crypto.cc2
-rw-r--r--src/node_file.cc4
-rw-r--r--src/node_http_parser.cc8
-rw-r--r--src/node_idle_watcher.cc4
-rw-r--r--src/node_io_watcher.cc2
-rw-r--r--src/node_net.cc16
-rw-r--r--src/node_script.cc4
-rw-r--r--src/node_signal_watcher.cc2
-rw-r--r--src/node_signal_watcher.h6
-rw-r--r--test/disabled/test-dns.js6
-rw-r--r--test/fixtures/b/c.js2
-rw-r--r--test/fixtures/child_process_should_emit_error.js2
-rw-r--r--test/pummel/test-net-tls.js2
-rw-r--r--test/simple/test-crypto.js4
-rw-r--r--test/simple/test-eio-race4.js2
-rw-r--r--test/simple/test-event-emitter-modify-in-emit.js2
-rw-r--r--test/simple/test-fs-chmod.js2
-rw-r--r--test/simple/test-fs-error-messages.js2
-rw-r--r--test/simple/test-fs-realpath.js8
-rw-r--r--test/simple/test-http-cat.js4
-rw-r--r--test/simple/test-http-tls.js2
-rw-r--r--test/simple/test-http-upgrade-client.js2
-rw-r--r--test/simple/test-http-upgrade-server2.js2
-rw-r--r--test/simple/test-http-wget.js18
-rw-r--r--test/simple/test-net-binary.js2
-rw-r--r--test/simple/test-net-tls.js2
-rw-r--r--test/simple/test-sendfd.js2
-rw-r--r--test/simple/test-url.js14
38 files changed, 96 insertions, 96 deletions
diff --git a/benchmark/http_simple.js b/benchmark/http_simple.js
index 74e44961b5..446b3b33f4 100644
--- a/benchmark/http_simple.js
+++ b/benchmark/http_simple.js
@@ -28,7 +28,7 @@ http.createServer(function (req, res) {
if (command == "bytes") {
var n = parseInt(arg, 10)
if (n <= 0)
- throw "bytes called with n <= 0"
+ throw "bytes called with n <= 0"
if (stored[n] === undefined) {
console.log("create stored[n]");
stored[n] = "";
@@ -64,7 +64,7 @@ http.createServer(function (req, res) {
var content_length = body.length.toString();
- res.writeHead( status
+ res.writeHead( status
, { "Content-Type": "text/plain"
, "Content-Length": content_length
}
diff --git a/benchmark/http_simple.rb b/benchmark/http_simple.rb
index ee33f57f1d..e9a44fa9fd 100644
--- a/benchmark/http_simple.rb
+++ b/benchmark/http_simple.rb
@@ -7,45 +7,45 @@ end
def wait(seconds)
n = (seconds / 0.01).to_i
- n.times do
+ n.times do
sleep(0.01)
- #File.read(DIR + '/yahoo.html')
+ #File.read(DIR + '/yahoo.html')
end
end
class SimpleApp
@@responses = {}
-
+
def initialize
@count = 0
end
-
+
def deferred?(env)
false
end
-
+
def call(env)
path = env['PATH_INFO'] || env['REQUEST_URI']
commands = path.split('/')
-
+
@count += 1
if commands.include?('periodical_activity') and @count % 10 != 1
return [200, {'Content-Type'=>'text/plain'}, "quick response!\r\n"]
end
-
+
if commands.include?('fibonacci')
n = commands.last.to_i
raise "fibonacci called with n <= 0" if n <= 0
body = (1..n).to_a.map { |i| fib(i).to_s }.join(' ')
status = 200
-
+
elsif commands.include?('wait')
n = commands.last.to_f
raise "wait called with n <= 0" if n <= 0
wait(n)
body = "waited about #{n} seconds"
status = 200
-
+
elsif commands.include?('bytes')
n = commands.last.to_i
raise "bytes called with n <= 0" if n <= 0
@@ -56,17 +56,17 @@ class SimpleApp
n = 20 * 1024;
body = @@responses[n] || "C"*n
status = 200
-
+
elsif commands.include?('test_post_length')
input_body = ""
while chunk = env['rack.input'].read(512)
- input_body << chunk
+ input_body << chunk
end
if env['CONTENT_LENGTH'].to_i == input_body.length
body = "Content-Length matches input length"
status = 200
else
- body = "Content-Length doesn't matches input length!
+ body = "Content-Length doesn't matches input length!
content_length = #{env['CONTENT_LENGTH'].to_i}
input_body.length = #{input_body.length}"
status = 500
@@ -75,7 +75,7 @@ class SimpleApp
status = 404
body = "Undefined url"
end
-
+
body += "\r\n"
headers = {'Content-Type' => 'text/plain', 'Content-Length' => body.length.to_s }
[status, headers, [body]]
@@ -90,6 +90,6 @@ if $0 == __FILE__
require 'thin'
require 'ebb'
# Rack::Handler::Mongrel.run(SimpleApp.new, :Port => 8000)
- Thin::Server.start("0.0.0.0", 8000, SimpleApp.new)
+ Thin::Server.start("0.0.0.0", 8000, SimpleApp.new)
# Ebb::start_server(SimpleApp.new, :port => 8000)
end
diff --git a/lib/crypto.js b/lib/crypto.js
index 17e6256515..dab3b8ad43 100644
--- a/lib/crypto.js
+++ b/lib/crypto.js
@@ -3596,7 +3596,7 @@ try {
var Verify = binding.Verify;
var crypto = true;
} catch (e) {
-
+
var crypto = false;
}
diff --git a/lib/net.js b/lib/net.js
index fd7a8fce79..8e0cc2548e 100644
--- a/lib/net.js
+++ b/lib/net.js
@@ -363,7 +363,7 @@ function setImplmentationMethods (self) {
return bytesWritten;
};
-
+
var oldRead = self._readImpl;
self._readImpl = function(buf, off, len, calledByIOWatcher) {
assert(self.secure);
diff --git a/lib/readline.js b/lib/readline.js
index 1f285eb517..9aab753611 100644
--- a/lib/readline.js
+++ b/lib/readline.js
@@ -164,7 +164,7 @@ Interface.prototype._ttyWrite = function (b) {
if (this.cursor === 0 && this.line.length === 0) {
this.close();
} else if (this.cursor < this.line.length) {
- this.line = this.line.slice(0, this.cursor)
+ this.line = this.line.slice(0, this.cursor)
+ this.line.slice(this.cursor+1, this.line.length)
;
this._refreshLine();
diff --git a/lib/repl.js b/lib/repl.js
index ecb75f516b..52ae11c3a3 100644
--- a/lib/repl.js
+++ b/lib/repl.js
@@ -137,14 +137,14 @@ REPLServer.prototype.readline = function (cmd) {
/**
* Used to parse and execute the Node REPL commands.
- *
+ *
* @param {cmd} cmd The command entered to check
- * @returns {Boolean} If true it means don't continue parsing the command
+ * @returns {Boolean} If true it means don't continue parsing the command
*/
REPLServer.prototype.parseREPLKeyword = function (cmd) {
var self = this;
-
+
switch (cmd) {
case ".break":
self.buffered_cmd = '';
@@ -171,7 +171,7 @@ REPLServer.prototype.parseREPLKeyword = function (cmd) {
};
function trimWhitespace (cmd) {
- var trimmer = /^\s*(.+)\s*$/m,
+ var trimmer = /^\s*(.+)\s*$/m,
matches = trimmer.exec(cmd);
if (matches && matches.length === 2) {
@@ -183,7 +183,7 @@ function trimWhitespace (cmd) {
* Converts commands that use var and function <name>() to use the
* local exports.context when evaled. This provides a local context
* on the REPL.
- *
+ *
* @param {String} cmd The cmd to convert
* @returns {String} The converted command
*/
@@ -191,18 +191,18 @@ REPLServer.prototype.convertToContext = function (cmd) {
var self = this, matches,
scopeVar = /^\s*var\s*([_\w\$]+)(.*)$/m,
scopeFunc = /^\s*function\s*([_\w\$]+)/;
-
+
// Replaces: var foo = "bar"; with: self.context.foo = bar;
matches = scopeVar.exec(cmd);
if (matches && matches.length === 3) {
return "self.context." + matches[1] + matches[2];
}
-
+
// Replaces: function foo() {}; with: foo = function foo() {};
matches = scopeFunc.exec(self.buffered_cmd);
if (matches && matches.length === 2) {
return matches[1] + " = " + self.buffered_cmd;
}
-
+
return cmd;
};
diff --git a/lib/string_decoder.js b/lib/string_decoder.js
index 2c7ace0ae5..ca47dc5202 100644
--- a/lib/string_decoder.js
+++ b/lib/string_decoder.js
@@ -11,7 +11,7 @@ var StringDecoder = exports.StringDecoder = function (encoding) {
StringDecoder.prototype.write = function (buffer) {
- // If not utf8...
+ // If not utf8...
if (this.encoding !== 'utf8') {
return buffer.toString(this.encoding);
}
diff --git a/src/node.cc b/src/node.cc
index a68776228b..5aa37120da 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -1166,7 +1166,7 @@ static Handle<Value> SetGid(const Arguments& args) {
}
int gid;
-
+
if (args[0]->IsNumber()) {
gid = args[0]->Int32Value();
} else if (args[0]->IsString()) {
diff --git a/src/node_buffer.cc b/src/node_buffer.cc
index 95b6bcf7cf..b9717842e1 100644
--- a/src/node_buffer.cc
+++ b/src/node_buffer.cc
@@ -509,8 +509,8 @@ Handle<Value> Buffer::ByteLength(const Arguments &args) {
enum encoding e = ParseEncoding(args[1], UTF8);
Local<Integer> length =
- Integer::New(e == UTF8 ? s->Utf8Length() : s->Length());
-
+ Integer::New(e == UTF8 ? s->Utf8Length() : s->Length());
+
return scope.Close(length);
}
diff --git a/src/node_cares.cc b/src/node_cares.cc
index 4b5077661d..34aeb8b639 100644
--- a/src/node_cares.cc
+++ b/src/node_cares.cc
@@ -24,7 +24,7 @@ using namespace v8;
static Handle<Value> IsIP(const Arguments& args) {
HandleScope scope;
-
+
if (!args[0]->IsString()) {
return scope.Close(Integer::New(4));
}
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 6eac2bed4e..e4e143fefc 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -1004,7 +1004,7 @@ class Cipher : public ObjectWrap {
delete [] buf;
Local<Value> outString;
- if (out_len==0) {
+ if (out_len==0) {
outString=String::New("");
} else {
if (args.Length() <= 2 || !args[2]->IsString()) {
diff --git a/src/node_file.cc b/src/node_file.cc
index a2ec39858e..bb181be403 100644
--- a/src/node_file.cc
+++ b/src/node_file.cc
@@ -432,7 +432,7 @@ static Handle<Value> MKDir(const Arguments& args) {
static Handle<Value> SendFile(const Arguments& args) {
HandleScope scope;
- if (args.Length() < 4 ||
+ if (args.Length() < 4 ||
!args[0]->IsInt32() ||
!args[1]->IsInt32() ||
!args[3]->IsNumber()) {
@@ -704,7 +704,7 @@ void File::Initialize(Handle<Object> target) {
NODE_SET_METHOD(target, "readlink", ReadLink);
NODE_SET_METHOD(target, "unlink", Unlink);
NODE_SET_METHOD(target, "write", Write);
-
+
NODE_SET_METHOD(target, "chmod", Chmod);
NODE_SET_METHOD(target, "chown", Chown);
diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc
index 53f19fbf5b..06bd05fc87 100644
--- a/src/node_http_parser.cc
+++ b/src/node_http_parser.cc
@@ -21,7 +21,7 @@
// No copying is performed when slicing the buffer, only small reference
// allocations.
-
+
namespace node {
using namespace v8;
@@ -194,7 +194,7 @@ class Parser : public ObjectWrap {
String::Utf8Value type(args[0]->ToString());
- Parser *parser;
+ Parser *parser;
if (0 == strcasecmp(*type, "request")) {
parser = new Parser(HTTP_REQUEST);
@@ -257,7 +257,7 @@ class Parser : public ObjectWrap {
if (parser->got_exception_) return Local<Value>();
Local<Integer> nparsed_obj = Integer::New(nparsed);
- // If there was a parse error in one of the callbacks
+ // If there was a parse error in one of the callbacks
// TODO What if there is an error on EOF?
if (!parser->parser_.upgrade && nparsed != len) {
Local<Value> e = Exception::Error(String::NewSymbol("Parse Error"));
@@ -333,7 +333,7 @@ static Handle<Value> UrlDecode (const Arguments& args) {
enum { CHAR, HEX0, HEX1 } state = CHAR;
- int n, m, hexchar;
+ int n, m, hexchar;
size_t in_index = 0, out_index = 0;
char c;
for (; in_index <= l; in_index++) {
diff --git a/src/node_idle_watcher.cc b/src/node_idle_watcher.cc
index 0ba8d9de89..851a6f8233 100644
--- a/src/node_idle_watcher.cc
+++ b/src/node_idle_watcher.cc
@@ -38,7 +38,7 @@ Handle<Value> IdleWatcher::SetPriority(const Arguments& args) {
HandleScope scope;
int priority = args[0]->Int32Value();
-
+
ev_set_priority(&idle->watcher_, priority);
return Undefined();
@@ -71,7 +71,7 @@ void IdleWatcher::Callback(EV_P_ ev_idle *w, int revents) {
}
-//
+//
// var idle = new process.IdleWatcher();
// idle.callback = function () { /* ... */ };
// idle.start();
diff --git a/src/node_io_watcher.cc b/src/node_io_watcher.cc
index 9b5c3b3ff6..3d519d12fa 100644
--- a/src/node_io_watcher.cc
+++ b/src/node_io_watcher.cc
@@ -61,7 +61,7 @@ void IOWatcher::Callback(EV_P_ ev_io *w, int revents) {
}
-//
+//
// var io = new process.IOWatcher();
// process.callback = function (readable, writable) { ... };
// io.set(fd, true, false);
diff --git a/src/node_net.cc b/src/node_net.cc
index cfeeb51418..36c106bed5 100644
--- a/src/node_net.cc
+++ b/src/node_net.cc
@@ -214,7 +214,7 @@ static inline Handle<Value> ParseAddressArgs(Handle<Value> first,
memset(&in6, 0, sizeof in6);
int port = first->Int32Value();
- in.sin_port = in6.sin6_port = htons(port);
+ in.sin_port = in6.sin6_port = htons(port);
in.sin_family = AF_INET;
in6.sin6_family = AF_INET6;
@@ -241,7 +241,7 @@ static inline Handle<Value> ParseAddressArgs(Handle<Value> first,
}
-// Bind with UNIX
+// Bind with UNIX
// t.bind(fd, "/tmp/socket")
// Bind with TCP
// t.bind(fd, 80, "192.168.11.2")
@@ -486,7 +486,7 @@ static Handle<Value> SocketError(const Arguments& args) {
return ThrowException(ErrnoException(errno, "getsockopt"));
}
- return scope.Close(Integer::New(error));
+ return scope.Close(Integer::New(error));
}
@@ -572,7 +572,7 @@ static Handle<Value> RecvFrom(const Arguments& args) {
struct sockaddr_storage address_storage;
socklen_t addrlen = sizeof(struct sockaddr_storage);
- ssize_t bytes_read = recvfrom(fd, (char*)buffer->data() + off, len, flags,
+ ssize_t bytes_read = recvfrom(fd, (char*)buffer->data() + off, len, flags,
(struct sockaddr*) &address_storage, &addrlen);
if (bytes_read < 0) {
@@ -653,7 +653,7 @@ static Handle<Value> RecvMsg(const Arguments& args) {
//
// XXX: Some implementations can send multiple file descriptors in a
// single message. We should be using CMSG_NXTHDR() to walk the
- // chain to get at them all. This would require changing the
+ // chain to get at them all. This would require changing the
// API to hand these back up the caller, is a pain.
int received_fd = -1;
@@ -696,7 +696,7 @@ static Handle<Value> Write(const Arguments& args) {
FD_ARG(args[0])
- if (!Buffer::HasInstance(args[1])) {
+ if (!Buffer::HasInstance(args[1])) {
return ThrowException(Exception::TypeError(
String::New("Second argument should be a buffer")));
}
@@ -1177,7 +1177,7 @@ static Handle<Value> GetAddrInfo(const Arguments& args) {
static Handle<Value> IsIP(const Arguments& args) {
HandleScope scope;
-
+
if (!args[0]->IsString()) {
return scope.Close(Integer::New(4));
}
@@ -1206,7 +1206,7 @@ static Handle<Value> CreateErrnoException(const Arguments& args) {
int errorno = args[0]->Int32Value();
String::Utf8Value syscall(args[1]->ToString());
- Local<Value> exception = ErrnoException(errorno, *syscall);
+ Local<Value> exception = ErrnoException(errorno, *syscall);
return scope.Close(exception);
}
diff --git a/src/node_script.cc b/src/node_script.cc
index a17287513a..2786cc002f 100644
--- a/src/node_script.cc
+++ b/src/node_script.cc
@@ -181,7 +181,7 @@ template <node::Script::EvalInputFlags iFlag,
}
const int fnIndex = sbIndex + (cFlag == newContext ? 1 : 0);
- Local<String> filename = args.Length() > fnIndex
+ Local<String> filename = args.Length() > fnIndex
? args[fnIndex]->ToString()
: String::New("evalmachine.<anonymous>");
@@ -253,7 +253,7 @@ template <node::Script::EvalInputFlags iFlag,
if (!nScript) {
return ThrowException(Exception::Error(
String::New("Must be called as a method of Script.")));
- }
+ }
nScript->script_ = Persistent<v8::Script>::New(script);
result = args.This();
}
diff --git a/src/node_signal_watcher.cc b/src/node_signal_watcher.cc
index c8dd3c7381..21f86646d2 100644
--- a/src/node_signal_watcher.cc
+++ b/src/node_signal_watcher.cc
@@ -22,7 +22,7 @@ void SignalWatcher::Initialize(Handle<Object> target) {
target->Set(String::NewSymbol("SignalWatcher"),
constructor_template->GetFunction());
-
+
callback_symbol = NODE_PSYMBOL("callback");
}
diff --git a/src/node_signal_watcher.h b/src/node_signal_watcher.h
index a875dd1f0d..9baeb0535e 100644
--- a/src/node_signal_watcher.h
+++ b/src/node_signal_watcher.h
@@ -21,7 +21,7 @@ class SignalWatcher : ObjectWrap {
ev_signal_init(&watcher_, SignalWatcher::Callback, sig);
watcher_.data = this;
}
-
+
~SignalWatcher() {
ev_signal_stop(EV_DEFAULT_UC_ &watcher_);
}
@@ -32,10 +32,10 @@ class SignalWatcher : ObjectWrap {
private:
static void Callback(EV_P_ ev_signal *watcher, int revents);
-
+
void Start();
void Stop();
-
+
ev_signal watcher_;
};
diff --git a/test/disabled/test-dns.js b/test/disabled/test-dns.js
index 631eb654ad..503a282c76 100644
--- a/test/disabled/test-dns.js
+++ b/test/disabled/test-dns.js
@@ -21,7 +21,7 @@ var hosts = ['example.com',
'google.com', // MX, multiple A records
'_xmpp-client._tcp.google.com', // SRV
'oakalynhall.co.uk' // Multiple PTR replies
- ];
+ ];
var records = ['A', 'AAAA', 'MX', 'TXT', 'SRV'];
@@ -58,12 +58,12 @@ function checkDnsRecord(host, record) {
while (ll--) {
var ip = result[ll];
var reverseCmd = "host " + ip +
- "| cut -d \" \" -f 5-" +
+ "| cut -d \" \" -f 5-" +
"| sed -e 's/\\.$//'";
child_process.exec(reverseCmd, checkReverse(ip));
}
- });
+ });
break;
case "MX":
dns.resolve(myHost, myRecord, function (error, result, ttl, cname) {
diff --git a/test/fixtures/b/c.js b/test/fixtures/b/c.js
index ee7cd47ad1..4b2273553e 100644
--- a/test/fixtures/b/c.js
+++ b/test/fixtures/b/c.js
@@ -11,7 +11,7 @@ debug("load fixtures/b/c.js");
var string = "C";
exports.SomeClass = function() {
-
+
};
exports.C = function () {
diff --git a/test/fixtures/child_process_should_emit_error.js b/test/fixtures/child_process_should_emit_error.js
index a777b6e876..8f79583907 100644
--- a/test/fixtures/child_process_should_emit_error.js
+++ b/test/fixtures/child_process_should_emit_error.js
@@ -1,4 +1,4 @@
-var exec = require('child_process').exec,
+var exec = require('child_process').exec,
puts = require('sys').puts;
[0, 1].forEach(function(i) {
diff --git a/test/pummel/test-net-tls.js b/test/pummel/test-net-tls.js
index 6d6dc31a4c..bad71ea506 100644
--- a/test/pummel/test-net-tls.js
+++ b/test/pummel/test-net-tls.js
@@ -102,7 +102,7 @@ try {
have_tls=true;
} catch (e) {
have_tls=false;
-}
+}
if (have_tls) {
var caPem = fs.readFileSync(fixturesDir+"/test_ca.pem");
diff --git a/test/simple/test-crypto.js b/test/simple/test-crypto.js
index 2cf052b151..a8276c387a 100644
--- a/test/simple/test-crypto.js
+++ b/test/simple/test-crypto.js
@@ -5,7 +5,7 @@ try {
} catch (e) {
console.log("Not compiled with OPENSSL support.");
process.exit();
-}
+}
var fs = require('fs');
var sys = require('sys');
@@ -68,7 +68,7 @@ var encryption_key = '0123456789abcd0123456789';
var iv = '12345678';
var cipher = crypto.createCipheriv("des-ede3-cbc", encryption_key, iv);
-var ciph = cipher.update(plaintext, 'utf8', 'hex');
+var ciph = cipher.update(plaintext, 'utf8', 'hex');
ciph += cipher.final('hex');
var decipher = crypto.createDecipheriv("des-ede3-cbc",encryption_key,iv);
diff --git a/test/simple/test-eio-race4.js b/test/simple/test-eio-race4.js
index 21402c8f35..9ab0c0d3ae 100644
--- a/test/simple/test-eio-race4.js
+++ b/test/simple/test-eio-race4.js
@@ -12,7 +12,7 @@ for (var i = 0; i < N; i++) {
} else {
throw new Error("this shouldn't be called");
}
- });
+ });
}
process.addListener("exit", function () {
diff --git a/test/simple/test-event-emitter-modify-in-emit.js b/test/simple/test-event-emitter-modify-in-emit.js
index 95de54755a..858aa9ef4d 100644
--- a/test/simple/test-event-emitter-modify-in-emit.js
+++ b/test/simple/test-event-emitter-modify-in-emit.js
@@ -43,7 +43,7 @@ assert.equal(2, e.listeners("foo").length)
e.removeAllListeners("foo")
assert.equal(0, e.listeners("foo").length)
-// Verify that removing callbacks while in emit allows emits to propagate to
+// Verify that removing callbacks while in emit allows emits to propagate to
// all listeners
callbacks_called = [ ];
diff --git a/test/simple/test-fs-chmod.js b/test/simple/test-fs-chmod.js
index 732f29bc63..10e62e89b5 100644
--- a/test/simple/test-fs-chmod.js
+++ b/test/simple/test-fs-chmod.js
@@ -12,7 +12,7 @@ fs.chmod(file, 0777, function (err) {
} else {
console.log(fs.statSync(file).mode);
assert.equal(0777, fs.statSync(file).mode & 0777);
-
+
fs.chmodSync(file, 0644);
assert.equal(0644, fs.statSync(file).mode & 0777);
success_count++;
diff --git a/test/simple/test-fs-error-messages.js b/test/simple/test-fs-error-messages.js
index 5284f49381..e964820fc3 100644
--- a/test/simple/test-fs-error-messages.js
+++ b/test/simple/test-fs-error-messages.js
@@ -158,6 +158,6 @@ try {
}
process.addListener('exit', function () {
- assert.equal(expected, errors.length,
+ assert.equal(expected, errors.length,
'Test fs sync exceptions raised, got ' + errors.length + ' expected ' + expected);
});
diff --git a/test/simple/test-fs-realpath.js b/test/simple/test-fs-realpath.js
index 6a6a70fb5f..441ade0a8f 100644
--- a/test/simple/test-fs-realpath.js
+++ b/test/simple/test-fs-realpath.js
@@ -9,7 +9,7 @@ function asynctest(testBlock, args, callback, assertBlock) {
var ignoreError = false;
if (assertBlock) {
try {
- ignoreError = assertBlock.apply(assertBlock,
+ ignoreError = assertBlock.apply(assertBlock,
Array.prototype.slice.call(arguments));
}
catch (e) {
@@ -106,7 +106,7 @@ function test_deep_relative_dir_symlink(callback) {
unlink.push(entry);
assert.equal(fs.realpathSync(entry), expected);
-
+
asynctest(fs.realpath, [entry], callback, function(err, result){
assert.equal(result, expected,
'got '+inspect(result)+' expected '+inspect(expected));
@@ -168,9 +168,9 @@ function test_deep_symlink_mix(callback) {
/tmp/node-test-realpath-f1 -> ../tmp/node-test-realpath-d1/foo
/tmp/node-test-realpath-d1 -> ../node-test-realpath-d2
/tmp/node-test-realpath-d2/foo -> ../node-test-realpath-f2
- /tmp/node-test-realpath-f2
+ /tmp/node-test-realpath-f2
-> /node/test/fixtures/nested-index/one/realpath-c
- /node/test/fixtures/nested-index/one/realpath-c
+ /node/test/fixtures/nested-index/one/realpath-c
-> /node/test/fixtures/nested-index/two/realpath-c
/node/test/fixtures/nested-index/two/realpath-c -> ../../cycles/root.js
/node/test/fixtures/cycles/root.js (hard)
diff --git a/test/simple/test-http-cat.js b/test/simple/test-http-cat.js
index 5bb778d0d1..21bef3ca25 100644
--- a/test/simple/test-http-cat.js
+++ b/test/simple/test-http-cat.js
@@ -27,10 +27,10 @@ server.listen(PORT, function () {
});
http.cat("http://localhost:12312/", "utf8", function (err, content) {
- if (err) {
+ if (err) {
console.log("got error (this should happen)");
bad_server_got_error = true;
- }
+ }
});
});
diff --git a/test/simple/test-http-tls.js b/test/simple/test-http-tls.js
index db4ce90eca..7b5336fea1 100644
--- a/test/simple/test-http-tls.js
+++ b/test/simple/test-http-tls.js
@@ -16,7 +16,7 @@ try {
have_openssl=false;
console.log("Not compiled with OPENSSL support.");
process.exit();
-}
+}
var request_number = 0;
var requests_sent = 0;
diff --git a/test/simple/test-http-upgrade-client.js b/test/simple/test-http-upgrade-client.js
index 4ca008588b..42babe6079 100644
--- a/test/simple/test-http-upgrade-client.js
+++ b/test/simple/test-http-upgrade-client.js
@@ -31,7 +31,7 @@ var parseHeaders = function(data) {
return o;
};
-// Create a TCP server
+// Create a TCP server
var srv = net.createServer(function(c) {
var data = '';
c.addListener('data', function(d) {
diff --git a/test/simple/test-http-upgrade-server2.js b/test/simple/test-http-upgrade-server2.js
index f34683d89d..3cba0f1c5f 100644
--- a/test/simple/test-http-upgrade-server2.js
+++ b/test/simple/test-http-upgrade-server2.js
@@ -10,7 +10,7 @@ server = http.createServer(function (req, res) {
server.addListener('upgrade', function (req, socket, upgradeHead) {
error('got upgrade event');
- // test that throwing an error from upgrade gets
+ // test that throwing an error from upgrade gets
// is uncaught
throw new Error('upgrade error');
});
diff --git a/test/simple/test-http-wget.js b/test/simple/test-http-wget.js
index 98ea43fc20..56372256a1 100644
--- a/test/simple/test-http-wget.js
+++ b/test/simple/test-http-wget.js
@@ -4,17 +4,17 @@ http = require("http");
// wget sends an HTTP/1.0 request with Connection: Keep-Alive
//
-// Sending back a chunked response to an HTTP/1.0 client would be wrong,
-// so what has to happen in this case is that the connection is closed
-// by the server after the entity body if the Content-Length was not
+// Sending back a chunked response to an HTTP/1.0 client would be wrong,
+// so what has to happen in this case is that the connection is closed
+// by the server after the entity body if the Content-Length was not
// sent.
//
-// If the Content-Length was sent, we can probably safely honor the
-// keep-alive request, even though HTTP 1.0 doesn't say that the
-// connection can be kept open. Presumably any client sending this
-// header knows that it is extending HTTP/1.0 and can handle the
-// response. We don't test that here however, just that if the
-// content-length is not provided, that the connection is in fact
+// If the Content-Length was sent, we can probably safely honor the
+// keep-alive request, even though HTTP 1.0 doesn't say that the
+// connection can be kept open. Presumably any client sending this
+// header knows that it is extending HTTP/1.0 and can handle the
+// response. We don't test that here however, just that if the
+// content-length is not provided, that the connection is in fact
// closed.
var server_response = "";
diff --git a/test/simple/test-net-binary.js b/test/simple/test-net-binary.js
index ad6f4f04a5..6db43e2329 100644
--- a/test/simple/test-net-binary.js
+++ b/test/simple/test-net-binary.js
@@ -9,7 +9,7 @@ for (var i = 255; i >= 0; i--) {
+ " "
+ JSON.stringify(S)
+ " "
- + JSON.stringify(String.fromCharCode(i))
+ + JSON.stringify(String.fromCharCode(i))
+ " "
+ S.charCodeAt(0)
);
diff --git a/test/simple/test-net-tls.js b/test/simple/test-net-tls.js
index b6c1d1195f..7373038785 100644
--- a/test/simple/test-net-tls.js
+++ b/test/simple/test-net-tls.js
@@ -11,7 +11,7 @@ try {
have_openssl=false;
console.log("Not compiled with OPENSSL support.");
process.exit();
-}
+}
var caPem = fs.readFileSync(fixturesDir+"/test_ca.pem", 'ascii');
var certPem = fs.readFileSync(fixturesDir+"/test_cert.pem", 'ascii');
diff --git a/test/simple/test-sendfd.js b/test/simple/test-sendfd.js
index 9c5d7313bd..18eb33146a 100644
--- a/test/simple/test-sendfd.js
+++ b/test/simple/test-sendfd.js
@@ -59,7 +59,7 @@ var logChild = function(d) {
};
// Create a pipe
-//
+//
// We establish a listener on the read end of the pipe so that we can
// validate any data sent back by the child. We send the write end of the
// pipe to the child and close it off in our process.
diff --git a/test/simple/test-url.js b/test/simple/test-url.js
index 0b81191fce..f3e13d8fad 100644
--- a/test/simple/test-url.js
+++ b/test/simple/test-url.js
@@ -169,10 +169,10 @@ for (var u in parseTests) {
a = JSON.stringify(actual[i]);
assert.equal(e, a, "parse(" + u + ")."+i+" == "+e+"\nactual: "+a);
}
-
+
var expected = u,
actual = url.format(parseTests[u]);
-
+
assert.equal(expected, actual, "format("+u+") == "+u+"\nactual:"+actual);
}
@@ -250,13 +250,13 @@ for (var u in formatTests) {
});
-//
+//
// Tests below taken from Chiron
// http://code.google.com/p/chironjs/source/browse/trunk/src/test/http/url.js
-//
+//
// Copyright (c) 2002-2008 Kris Kowal <http://cixar.com/~kris.kowal>
// used with permission under MIT License
-//
+//
// Changes marked with @isaacs
var bases = [
@@ -392,7 +392,7 @@ var bases = [
['./' , bases[3], 'fred:///s//a/b/'],
['../' , bases[3], 'fred:///s//a/'],
['../g' , bases[3], 'fred:///s//a/g'],
-
+
['../../' , bases[3], 'fred:///s//'],
['../../g' , bases[3], 'fred:///s//g'],
['../../../g', bases[3], 'fred:///s/g'],
@@ -512,5 +512,5 @@ var bases = [
assert.equal(e, a,
"resolve("+[relativeTest[1], relativeTest[0]]+") == "+e+
"\n actual="+a);
-});
+});