Commit Graph

1537 Commits (7418905aef0c0fcbd13227526adc34f1e699fe45)

Author SHA1 Message Date
Ben Noordhuis aeb124f7f3 test: create test file in temp dir 2011-12-05 06:37:18 +01:00
Ben Noordhuis 49ba55b100 Merge branch 'v0.6'
Conflicts:
	src/node_version.h
2011-12-02 16:34:33 +01:00
Bert Belder e84edd2593 Win: make process.cwd and chdir support non-ansi characters
Closes GH-2215
2011-12-02 02:21:50 +01:00
Ben Noordhuis 3d22dbf27b cli: add -p switch, print result of --eval 2011-12-01 18:02:15 +01:00
Ben Noordhuis 03eb41c2ec net: don't emit 'close' event twice
Don't allow `socket.destroy()` to run twice. The self-destruct sequence itself
is idempotent but it makes the 'close' and 'error' events fire more than once,
which may confuse listeners.

Fixes #2223.
2011-12-01 14:57:06 +01:00
Ben Noordhuis f44d0b9044 crypto: throw exception on unknown digest method
Fixes #2227.
2011-11-30 14:27:53 +01:00
Nathan Rajlich b204006105 util: ensure that the .inspect function isn't the one being executed
Fixes #2225.
2011-11-30 14:14:24 +01:00
Ingmar Runge 260383215b node_crypto: use EVP_Cipher*_ex methods, not 'obsolete' versions
This also fixes an issue that made blowfish's ECB mode unusable.
2011-11-30 01:29:35 +01:00
seebees aab958b713 OutgoingMessage.prototype.write does not take Array
Changed the type checking for OutgoingMessage.prototype.write so it only accepts string and Buffer.

And test.
Fixes #2162
Fixes #2208
2011-11-29 16:52:15 +09:00
koichik 5451ba3aa8 tls: fix https with fs.openReadStream hangs
Fixes #2185.
Fixes #2198.
2011-11-27 16:31:45 +09:00
koichik 6392eba3f9 test: update an expired certificate 2011-11-27 02:05:24 +09:00
Bert Belder cffd0bb68d Merge branch 'v0.6'
Conflicts:
	Makefile
	src/node_version.h
	test/simple/test-http-response-no-headers.js
2011-11-25 12:34:29 +01:00
Bert Belder b480cfaf34 Make the pummel test runner not crash on windows when a directory is locked 2011-11-25 10:27:30 +01:00
Author: Igor Zinkovsky 1f16a7b6e5 Enable long paths on windows 2011-11-25 09:35:52 +01:00
Bert Belder 232e8e19a1 Fix test-stdin-from-file 2011-11-25 03:08:27 +01:00
Bert Belder 236b217cd7 Fix issues with test-fs-chmod
- The test simultaneously chmods and fchmods the same file.
- On windows, it leaves behind a fixture in read-only mode,
  which causes test-fs-fsync to fail.
2011-11-25 01:25:38 +01:00
Ben Noordhuis 55a8a3aad4 test: better fs.lchmod() availability check
fs.lchmod() is a BSD-ism, not a "not Windows"-ism.
2011-11-25 00:56:05 +01:00
Bert Belder a639cf7d84 Add test for GH-2177 2011-11-24 19:56:41 +01:00
isaacs 0ba78d5f36 Close #2166 Close the fd in lchmod 2011-11-22 14:00:48 -08:00
Felix Geisendörfer 6e1e9e2fcb Get test-http-response-no-headers.js to pass
Main fix was in 3abebf which added HTTP/0.9 support to http parser.

Changed test because HTTP 1.1 mandates keep-alive when no headers are
given.

Fixes #1711
2011-11-22 22:48:50 +01:00
Ben Noordhuis 246805d386 test: add 'response body with no headers' http test
HTTP/0.9 - fails with a parse error
HTTP/1.0 - works
HTTP/1.1 - fails with an empty response body

See #1711.
2011-11-22 22:47:20 +01:00
Ryan Dahl 8595981195 Merge remote branch 'origin/v0.6'
Conflicts:
	Makefile
	src/node_version.h
	test/simple/test-crypto.js
2011-11-22 13:01:10 -08:00
Felix Geisendörfer b3f91f15b2 Remove support for multi-source pipe()
This reverts 6c5b31bd which had too few use cases, too much complexity,
and can be handled in user-land by using `{end: false}`.

Closes #1996
2011-11-22 08:51:19 -08:00
isaacs e543b0e95e zlib: Fix invalidly failing test 2011-11-22 08:51:19 -08:00
Ben Noordhuis 7defbd27ef test: add DSA sign/verify crypto tests 2011-11-22 16:01:07 +01:00
Maciej Małecki 3f862cf179 test: `stdin` isn't closed after `resume()` and `pause()`
This works on `node v0.4.12`, but doesn't work on `node v0.6.2`
2011-11-21 12:34:19 +01:00
isaacs 975f1930b1 zlib: Fix invalidly failing test 2011-11-18 14:38:44 -08:00
Ben Noordhuis 59a9a9b5b0 buffer: add .read*() and .write*() methods to SlowBuffer prototype
Fixes #2138.
2011-11-18 11:13:37 +01:00
Ben Noordhuis 9d3faf4f9a crypto: add support for RSA public key signing/verification 2011-11-17 23:01:39 +01:00
Ben Noordhuis 3ac5f1106d crypto: make verify() return true or false, not 1 or 0
It's what the documentation says it should return.
2011-11-17 23:01:39 +01:00
Ben Noordhuis 534e41b474 crypto: make verify() return true or false, not 1 or 0
It's what the documentation says it should return.
2011-11-17 21:17:21 +01:00
Ben Noordhuis bed405cfea Merge remote branch 'origin/v0.6' 2011-11-17 20:06:50 +00:00
Ben Noordhuis 4f38c5ece3 test: add 'response body with no headers' http test
HTTP/0.9 - fails with a parse error
HTTP/1.0 - works
HTTP/1.1 - fails with an empty response body

See #1711.
2011-11-17 16:32:09 +01:00
Ben Noordhuis 8f15582ef3 test: add 'no response headers' http parser test 2011-11-17 13:36:29 +01:00
Ben Noordhuis 5e3b0095de tls: make cipher list configurable
options.ciphers existed but didn't work, the cipher list was effectively
hard-coded to RC4-SHA:AES128-SHA:AES256-SHA.

Fixes #2066.
2011-11-17 00:01:41 +01:00
Łukasz Walukiewicz 3b852d7fab buffer: fix minimum values for writeInt*() functions 2011-11-16 21:30:26 +01:00
Łukasz Walukiewicz 5d0b5a00aa buffer: fix minimum values for writeInt*() functions 2011-11-16 21:27:26 +01:00
seebees 3222a04d5e test for REPL .save and .load and documentation updates 2011-11-13 19:54:35 +01:00
seebees 3421f43351 .load, .save and local scope tab completion
Fixes #2063.

REPLServer.prototype.resetContext:
Reset the line cache

REPLServer.prototype.memory (don't know if I like that name, called from finish)
pushes what cmd's have been executed against it into this.lines
pushes the "tab depth" for bufferedCommands, in this.lines.level

REPLServer.prototype.displayPrompt:
Uses "tab depth" from this.lines.level to adjust the prompt to visually
denote this depth e.g.
> asdf = function () {
… var inner = {
….. one:1

REPLServer.prototype.complete:
Now notices if there is a bufferedCommand and attempts determine locally
scoped variables by removing any functions from this.lines and evaling these
lines in a nested REPL e.g.
> asdf = function () {
… var inner = { one: 1};
… inn\t
will complete to 'inner' and inner.o\t will complete to 'inner.one'
If the nested REPL still has a bufferedCommand it will falls back to the
default.

ArrayStream is a helper class for the nested REPL to get commands pushed to it.
new REPLServer('', new ArrayStream());

Finally added two new REPL commands .save and .load, each takes 1 parameter,
a file and attempts to save or load the file to or from the REPL
respectively.
2011-11-12 11:34:55 -08:00
seebees b00f5e2e14 Tab Compete test for node REPL
Currently the REPL only tab completes for globally scoped variables
2011-11-12 11:34:55 -08:00
Ben Noordhuis 098fef6740 timers: remember extra setTimeout() arguments when timeout==0
Fixes #2079.
2011-11-12 13:31:28 +01:00
Shigeki Ohtsu e0f10ecfd9 debugger: correctly handle source with multi-byte characters 2011-11-11 20:29:50 +01:00
Ben Noordhuis 10d4bd8266 test: add more punycode tests 2011-11-11 17:02:43 +01:00
Igor Zinkovsky 13324bf844 throw from stdout.end and stderr.end 2011-11-10 14:51:16 -08:00
Ryan Dahl da9bf0ee80 Fixes #2047. Fill workers array immediately after fork 2011-11-08 17:03:29 -08:00
Ben Noordhuis 6f96e78dea test: fs.realpath() should not call its callback twice
Test case for #2045.
2011-11-08 13:03:29 +01:00
Ben Noordhuis 04958e88a4 fs: make mkdir() call callback if mode is omitted
Fixes #2043.
2011-11-08 12:48:09 +01:00
Fedor Indutny da82daf54c test: debugger-repl should wait for 'drain' event 2011-11-05 15:24:28 +01:00
Igor Zinkovsky 7335a4234a fix test-module-loading on windows 2011-11-04 18:05:53 -07:00
Matt Robenolt 5213c39038 Close #1930 Convenience methods for zlib
This is a combination of 20 commits. Their commit messages are preserved
below for the benefit of future generations.

* Adding a shortcut to easily compress/decompress a string of text.
* Making the API consistent. unzip should accept a Buffer for input as well.
* Adding docs.
* Oops, typo.
* Propagate error through the callback.
* Adding zlib from string tests.
* Typo in test.
* Remove 'end' listeners, and join buffers properly instead of joining them
  as a string.
* Oops, needs to be rendered to a string.
* Updated test to include multi-byte characters.
* unzip should return a raw Buffer. Updated docs to reflect.
* And finally updating test.
* EventEmitter.destroy() is a bit more customary
* Revert "EventEmitter.destroy() is a bit more customary"
* Renaming internal methods to "buffer" instead of string.
* Remove the 'error' listeners as well.
* @isaacs: spacing/style, and compress duplicate functions into one
* @isaacs: Update docs
* @isaacs: doc style fix
2011-11-04 10:32:57 -07:00
Fedor Indutny 8ef2c13d6c fix debugger-repl test 2011-11-04 18:00:18 +01:00
Fedor Indutny b5d32d4a9e debugger: do not request `continue` on connection
* Updated test
* Use `node debug file`, not `node debug -e "..."` in test
2011-11-04 17:50:46 +01:00
Bert Belder 829735e738 Implement process._debugProcess 2011-11-04 17:50:28 +01:00
Jordan Sissel 358f0ce96b url: add '.' '+' and '-' in url protocol
- Based on BNF from RFC 1738 section 5.
- Added tests to cover svn+ssh and some other examples
2011-11-04 13:36:06 +01:00
Ben Noordhuis 8974ba31a3 test: fix simple/net-pipe-connect-errors
When trying to connect to something that is not a UNIX socket, Linux returns
ECONNREFUSED, not ENOTSOCK.

We cannot atomically determine if the other end is a) a stale socket, or b) not
a socket at all, so let's accept both error codes.
2011-11-04 05:30:00 +01:00
Fedor Indutny b904a078d8 report debugger's test errors 2011-11-03 14:11:14 -07:00
Ryan Dahl 4a8088a603 Socket.write should reset timeout timer.
Fixes #2002.
2011-11-03 12:37:04 -07:00
Ben Noordhuis 9c11e8a1ca net: implement Server.prototype.address() for pipes 2011-11-03 19:16:10 +01:00
Maciej Małecki 481c17504d test error codes related to pipes
This tests passes on node v0.4, but fails on node v0.5. v0.5 seems to
generally lack error codes for various error events related to UNIX
pipes.

Fixes #2001
2011-11-03 10:54:00 -07:00
Igor Zinkovsky 24a69d22a0 process.kill to use uv_kill 2011-11-02 17:34:17 -07:00
Ben Noordhuis 359a65a6db http: emit Error object after .abort()
It was emitting the net.Socket object due to misuse of the arguments object.

Fixes #1399.
2011-11-03 01:30:03 +01:00
Ryan Dahl 850609ea2d Remove separation of libuv tests 2011-11-02 16:38:59 -07:00
Ben Noordhuis c8646e0c41 test: add ChildProcess.prototype.killed test case 2011-11-02 18:37:34 +01:00
Igor Zinkovsky cc92234068 fix pummel/test-net-throttle on windows 2011-11-01 16:44:08 -07:00
Maciej Małecki fc61134b1a doc: fix links
Changes:

  * 'http://github.com' => 'https://github.com'
  * 'https://github.com/ry/node' => 'https://github.com/joyent/node'
  * 'https://github.com/ry/http-parser' =>
    'https://github.com/joyent/http-parser'
  * old issue links
  * wiki link
2011-11-01 22:26:52 +01:00
Ben Noordhuis 37bb37d151 os: rename getNetworkInterfaces() to networkInterfaces() 2011-11-01 18:10:06 +01:00
Ben Noordhuis 362b5a6c40 process: fix process.nextTick() error case regression
Patch and test by Koichi Kobayashi.
2011-11-01 16:30:43 +01:00
koichik f5a01d1764 test: fix test/message/undefined_reference_in_new_context.js
after 4d4900f, stack trace was changed.
2011-11-01 19:30:19 +09:00
koichik f53d092a2a tls, https: add passphrase option
Fixes #1925.
2011-10-31 17:36:43 +09:00
Siddharth Mahendraker 12cf730b69 events: separate maxListeners and _events
Fixes #1479.
Fixes #1923.
2011-10-30 02:14:30 +01:00
Igor Zinkovsky 6d7aa65399 fix pummel/test-child-process-spawn-loop.js on windows 2011-10-28 18:32:27 -07:00
Igor Zinkovsky 56315494dd fix simple/test-child-process-double-pipe on windows 2011-10-28 15:57:39 -07:00
Nathan Rajlich 4fb2ac5be1 Add test cases for #1944. 2011-10-27 04:58:51 +09:00
Nathan Rajlich d4379fcee3 Add test case for #1941.
Add test for the false-positives from #1942.
Fix test-sys.js.
2011-10-27 04:33:24 +09:00
Nathan Rajlich a6a04fb1ec Add test case for the util.js type checking functions. 2011-10-27 03:38:29 +09:00
koichik cbcaeedba9 tls: add address(), remoteAddress/remotePort
Fixes #758.
Fixes #1055.
2011-10-27 00:28:16 +09:00
koichik 0e8a55d2a2 tls: does not emit 'end' from EncryptedStream
de09168 and 4cdf9d4 breaks `test/pummel/test-https-large-response.js`.
It is never finished.

Fixes #1936.
2011-10-27 00:18:29 +09:00
Igor Zinkovsky 0a5708c3e9 fix test-http-curl-chunk-problem.js and test-pipe-file-to-http.js on windows 2011-10-25 14:10:12 -07:00
Ben Noordhuis dddfd0f8b8 test: spawn process.argv[0], not 'node'
'node' may or may not be on the path and may or may not be the version we are
running the test suite for.
2011-10-25 02:24:51 +02:00
isaacs 4c5751ba97 Close #1929 zlib Respond to 'resume' events properly 2011-10-24 12:55:45 -07:00
seebees 216570b5e1 Lint 2011-10-22 14:14:40 +09:00
seebees 1ead20f274 remove auth from host
Fixes #1626
2011-10-22 14:14:40 +09:00
seebees 005d607aed http.request(url.parse(x))
http2.js

protocols object to store defaults for http and https, and use as a switch for supported protocols.
options.hostname > options.host > 'localhost'
if I have an options.auth element and I do not have an Authorization header, I do basic auth.
http.request collapses to new ClientRequest since the defaults are handled by the protocol object

test-http-url.parse*

Fixes #1390

Conflicts:

	lib/http2.js
2011-10-22 14:14:40 +09:00
seebees be4576de7a url.resolveObject(url.parse(x), y) == url.parse(url.resolve(x, y));
added a .path property = .pathname + .search for use with http.request

And tests to verify everything.
With the tests, I changed over to deepEqual, and I would note the comment on the test
['.//g', 'f:/a', 'f://g'], which I think is a fundamental problem

This supersedes pull 1596
2011-10-22 14:14:39 +09:00
Ryan Dahl 493d3b9f7c Merge remote branch 'origin/v0.4'
Conflicts:
	ChangeLog
	Makefile
	deps/libev/wscript
	doc/index.html
	doc/template.html
	lib/net.js
	src/node_version.h
	src/platform_cygwin.cc
	test/pummel/test-net-write-callbacks.js
	test/simple/test-buffer.js
2011-10-21 18:02:30 -07:00
Igor Zinkovsky 8498ee03bc make simple\test-fs-symlink.js work on windows 2011-10-21 17:31:32 -07:00
Maciej Małecki 8f1ba251dd test: #1899 - output in child process raises an exception 2011-10-21 15:53:09 -07:00
Ryan Dahl d5a21a29f8 getaddrinfo returns ENOTFOUND for invalid domain names
change test-http-dns-error to reflect this.
2011-10-21 15:19:53 -07:00
Ryan Dahl efa95c2718 Fix test-eio-race on Windows 2011-10-21 14:55:28 -07:00
isaacs caf70f5e94 Revert "Don't use a separate context for the repl."
This reverts commit b70fed48a7.
2011-10-21 13:00:37 -07:00
Igor Zinkovsky 69b73f9cf0 make process.kill a no-op on windows 2011-10-21 10:27:22 -07:00
Ryan Dahl fafb584881 Fix race condition in test-dgram-pingpong 2011-10-21 10:21:23 -07:00
Ben Noordhuis 84d0b1bcc5 http: improve http parser bindings
Speeds up HTTP benchmarks by 10% on average.
2011-10-20 19:19:02 -07:00
Ryan Dahl be2320d408 Add binding to uv_getaddrinfo 2011-10-20 15:06:53 -07:00
Ryan Dahl 9d27faa2c4 Revert "Fix #1801 vm: Use 'sandbox' as global_prototype"
Accidentally committed. Revert until review.

This reverts commit 200df8641b.
2011-10-19 11:01:08 -07:00
Thomas Parslow b0f78afe58 http: Added support for HTTP PATCH verb
Fixes #1907.
2011-10-19 19:59:16 +09:00
isaacs b70fed48a7 Don't use a separate context for the repl.
Fix #1484
Fix #1834
Fix #1482
Fix #771

It's been a while now, and we've seen how this separate context thing
works.  It constantly confuses people, and no one actually uses '.clear'
anyway, so the benefit of that feature does not justify the constant
WTFery.

This makes repl.context actually be a getter that returns the global
object, and prints a deprecation warning.  The '.clear' command is gone,
and will report that it's an invalid repl keyword.  Tests updated to
allow the require, module, and exports globals, which are still
available in the repl just like they were before, by making them global.
2011-10-18 18:18:32 -07:00
elliottcable 200df8641b Fix #1801 vm: Use 'sandbox' as global_prototype
Squashed commit:

(- re tests) Cleaning up the `Script` test suite.

For whatever reason, there were several duplicate test files related to `Script`
and the `'vm'` module. I removed these, and fixed a few other small issues.
(More fixes coming in subsequent commits.)

Squashes: 19e86045a0..1e3dcff4eb

(api fix:1801 new:1801) `'vm'` module uses sandbox as prototype

As described in GH-1801, the `'vm'` module was handling the `sandbox` object
provided by the API consumer in a particularly terrible and fragile fashion: it
was simply shallow-copying any enumerable properties from the sandbox onto the
global context before executing the code, and then eventually copying any values
on the global context back into the sandbox object *afterwards*.

This commit removes all of that implementation, and utilizes the passed sandbox
object as the *prototype of the context* instead. A bit of a hack, but a very
effective one.

This no longer allows for new variables created in the global context to be
placed into your sandbox after execution has completed, but that’s for the best
anyway, as it’s not very in line with the concept of a “box of passed-in
context.” I’m planning to further implement an interface for API consumers to
acquire the *actual global* from within the VM soon, thus allowing for
separation-of-concerns: providing data *to* the VM via the sandbox-prototype,
and exploring the internal environment of the VM itself.

// GitHub cruft: closes #1801

Squashes: 43b8e3c..209ed86
2011-10-18 17:56:35 -07:00
Ryan Dahl d9bc8455cb Fix test-c-ares.js on Windows by disabling PTR test 2011-10-18 16:12:07 -07:00
Ryan Dahl 5783a52a9c Remove process.memoryUsage().vsize
Not meaningful cross platform; unused.
2011-10-18 14:31:37 -07:00
Ryan Dahl d77ce4b998 Fixes #1860. Remove process.writeError
Breaks a few tests in "make test-message"
2011-10-18 13:12:50 -07:00
koichik d2698d1822 http: add test for #1885 2011-10-17 16:14:35 +09:00
Igor Zinkovsky 5ca3dcd127 test: fix test-child-process-stdin and test-child-process-kill on windows 2011-10-15 22:55:24 +02:00
koichik d6191f593d net: fix error handling in listen()
Fixes #1894.
2011-10-16 01:30:19 +09:00
koichik 68cc173c6d tls: The TLS API is inconsistent with the TCP API
Add 'secureConnect' event to tls.CleartextStream.

Fixes #1467.
2011-10-15 19:27:21 +09:00
Ben Noordhuis 6df574b744 net: properly account multi-byte chars in .bytesWritten 2011-10-15 03:24:34 +02:00
Ben Noordhuis 2f8596ee10 test: fix bug in setproctitle test
Output from `ps` may contain trailing whitespace, trim it.
2011-10-15 02:07:57 +02:00
Ben Noordhuis b6a869ef4f test: check that EventEmitter.on == EventEmitter.addListener 2011-10-15 01:08:41 +02:00
Ben Noordhuis 018e110cd1 test: replace .addListener() calls with .on() 2011-10-15 01:08:36 +02:00
koichik 19a855382c tls: requestCert unusable with Firefox and Chrome
Fixes #1516.
2011-10-15 00:54:46 +09:00
koichik a09b747f30 child_process.fork: don't modify args
Fixes #1888.
2011-10-15 00:15:38 +09:00
isaacs 59a5262041 Fix #1882 zlib Update 'availOutBefore' value, and test 2011-10-13 16:47:51 -07:00
Simen Brekken 4b0e36810a net: register net.Server callback only once
Only register once for listening when passing a callback to Server.listen(),
this prevents servers recycled using close() from invoking the callback when
Server.listen() is called later.
2011-10-13 16:09:14 +02:00
Ben Noordhuis 5faff9ebdf test: test long process name support
On platforms that support it: linux, freebsd, darwin
2011-10-13 15:47:05 +02:00
Ryan Dahl 3a34972672 Fix test-http-conn-reset.js on OSX 2011-10-12 17:31:49 -07:00
Ryan Dahl e911171e03 Move some slow tests to pummel 2011-10-12 16:59:00 -07:00
Ryan Dahl 7b4370e5f8 Fix test/pummel/test-watch-file.js 2011-10-12 16:19:46 -07:00
Ryan Dahl 651b8a06d6 Fix test/pummel/test-exec.js 2011-10-12 16:12:24 -07:00
Ben Noordhuis c82828ec27 test: add test for #1869
fs.readdir() on file should raise ENOTDIR, not UNKNOWN.
2011-10-12 17:37:30 +02:00
Igor Zinkovsky 99757cbeb2 fix simple/test-fs-utimes.js on windows 2011-10-11 22:50:16 -07:00
Ryan Dahl 0e2bbac4e0 Fix test-module-load-list.js 2011-10-11 14:49:39 -07:00
Ryan Dahl 9631e29933 Remove tests relying on !process.features.uv 2011-10-11 14:47:02 -07:00
Ryan Dahl d2b8037ed0 disable test-sendfd 2011-10-11 13:03:29 -07:00
Ryan Dahl 53c163cd5b Disable test-child-process-custom-fds.js 2011-10-11 11:27:58 -07:00
Ryan Dahl ca4a0fce65 Remove test-child-process-channel.js 2011-10-10 14:27:52 -07:00
Ryan Dahl 982b19dbd7 Adjust listenFD deprecation message. Remove test. 2011-10-10 14:24:56 -07:00
Ryan Dahl 2c25507b81 process.stderr goes through libuv now
This commit removes one assert from test-console.js in which we check that
process.stderr.write returns true. In the case of a dump to a file we cannot
guarantee this any longer now that it goes through fs.WriteStream.
2011-10-10 14:15:44 -07:00
Igor Zinkovsky af014c1a5e fix for simple/test-executable-path.js on windows 2011-10-07 17:48:47 -07:00
Ryan Dahl 12486a6437 Change API for sending handles
Does not support sending net.Server objects only raw TCPWrap objects.
2011-10-07 16:43:55 -07:00
Ryan Dahl 26c08a3f35 Do load balancing test in test-child-process-fork2. 2011-10-07 13:58:55 -07:00
Ryan Dahl 899358e797 Add test-child-process-fork2 and fixes to make it work 2011-10-07 04:03:47 -07:00
Ryan Dahl f6d889523d mv test-child-process-spawn-node.js test/simple/test-child-process-fork.js 2011-10-06 22:56:29 -07:00
Colton Baker 87286cc737 Fixed a lot of jslint errors.
Fixes #1831
2011-10-05 18:51:06 -07:00
Ben Noordhuis 976c6b0826 test: add TXT DNS record lookup test 2011-10-03 16:50:09 +02:00
Maciej Małecki 365fdbfc64 test: Update assert module tests 2011-10-02 02:25:52 +02:00
Fedor Indutny 360ce526fd debugger: watch, unwatch, watchers
Fixes #1800.
2011-09-30 13:22:56 -07:00
Ryan Dahl 007ddcd2cd Move test-net-write-callbacks to pummel
Runs in 3 seconds.
2011-09-30 10:31:39 -07:00
Ryan Dahl 49806864e4 Add test from v0.4 dea49e3
Note this test completes in 3 seconds on v0.4 and 7 minutes on master. NOT
GOOD.
2011-09-30 09:56:37 -07:00
koichik 49ac083dc1 tls: Add test for #1775 2011-09-30 15:44:13 +09:00
Ben Noordhuis fa44659c66 test: fix typo in error message 2011-09-29 04:51:40 +02:00
Ryan Dahl dea49e3d19 net: Fix string-concat hot path bug
Also removes functionality added in f9fec3a2d6
because it changes API. (That patch shouldn't have been added anyway.)
2011-09-28 17:49:33 -07:00
Fedor Indutny 1b8b097fad debugger: refactor, no more res.success checks
Fixes #1779.
2011-09-28 11:40:51 -07:00
Fedor Indutny 542156a6a1 debugger: use regexps in repl test
Fixes #1788
2011-09-28 11:39:45 -07:00
Ryan Dahl 41d811f41f Fix test-module-load-list.js 2011-09-27 13:11:09 -07:00
Ryan Dahl f5bdce9cc0 Disable test-dgram-unix.js test-dgram-unix-anon.js test-dgram-multicast.js 2011-09-27 12:52:48 -07:00
Ben Noordhuis 413d38c43b test: test crypto (P)RNG functions 2011-09-27 20:27:57 +02:00
Fedor Indutny f4124e18cb debugger: setBreakpoint('fn()')
Fixes #1777
2011-09-27 00:26:16 -07:00
Ryan Dahl 040cf02724 Re-land Bert's test for #1697
Was reverted out in cde81a6675
2011-09-26 12:50:59 -07:00
Fedor Indutny c26cf84a08 debugger: fix backtrace with no frames
Fixes #1768
2011-09-26 10:57:19 -07:00
Ben Noordhuis f6bce20e5e buffers: handle bad length argument in constructor
Coerce fractional, negative and non-numeric length arguments to numbers.
Fractional numbers are rounded up, negative numbers and non-numeric values
are set to zero.
2011-09-24 18:31:56 +02:00
Ben Noordhuis d157131439 buffers: handle bad length argument in constructor
Coerce fractional, negative and non-numeric length arguments to numbers.
Fractional numbers are rounded up, negative numbers and non-numeric values
are set to zero.
2011-09-24 18:27:03 +02:00
Fedor Indutny 39fec6003e debugger: remove useless clearlines, updated test
* remove useless clearline call at Interface start
* silence after .handleBreak()
* output '\b' if this.stdout is not a tty (debugger)
* add '\b' checks for clearline (test)
2011-09-23 13:42:41 -07:00
Fedor Indutny e406613ee5 test-debugger-repl improvements 2011-09-23 13:42:41 -07:00
Fedor Indutny 1e37efb08b initial tests
* Don't buffer command, before it's execution (repl)
* `quit` command, custom streams for .start, stubbed out test, disable
  history repeation for non-tty (debugger)
2011-09-23 09:38:24 -07:00
Igor Zinkovsky 8fe5712477 fs watcher binding 2011-09-22 22:32:33 -07:00
isaacs 74c02066fe Add broken test for #1726. 2011-09-22 19:38:01 -07:00
isaacs e06ce7562c Fix #1707 hasOwnProperty usage
If hasOwnProperty is overridden, then calling `obj.hasOwnProperty(prop)`
can fail.  Any time a dictionary of user-generated items is built, we
cannot rely on hasOwnProperty being safe, so must call it from the
Object.prototype explicitly.
2011-09-15 10:54:08 -07:00
isaacs b3af074a02 Add querystring test for hasOwnProperty usage 2011-09-15 09:52:49 -07:00
Ben Noordhuis 5724b54d2e test: add http multi-line header test
Test case for #1569. Verify that http_parser parses multi-line headers.
2011-09-14 16:29:32 +02:00
koichik fdbfc9ceb7 net: Socket write encoding case sensitivity
Fixes #1586.
2011-09-04 13:53:38 +09:00
koichik 3e853e627e buffer: write() should always set _charsWritten.
Refs #1633.
2011-09-03 11:48:27 +09:00
koichik 96ede8cc9b buffer: Avoid overrun with 'binary' encoding.
Fixes #1624.
2011-09-02 09:56:58 +09:00
Nathan Rajlich 0c91a835ff util: isRegExp() should not call toString() on its argument
An overloaded toString() method may have side effects
so don't call it for a simple type check.

Back-port of 54b409d to the v0.4 branch.
2011-08-25 19:23:31 +02:00
Ryan Dahl ce9caa237f Fix #1563. overflow in ChildProcess custom_fd.
Backported from master f5db3f1f85
2011-08-20 12:42:58 -07:00
Ryan Dahl c1ae6ea2f2 Add TTYWrap 2011-09-20 13:39:48 -07:00
isaacs d104bfd5a6 zlib: Fix test so that it's not trivially passing, then pass it.
Regression from the refactor to move more things into JS.
2011-09-17 23:03:23 -07:00
isaacs 5b8e1dabbc Initial pass at zlib bindings 2011-09-17 18:22:09 -07:00
Ryan Dahl cde81a6675 Revert "Add regression test for issue 1697"
Causing many test failures due to lingering process

This reverts commit 8b754a9e02.
2011-09-16 17:24:34 -07:00
Bert Belder 8b754a9e02 Add regression test for issue 1697 2011-09-17 00:05:15 +02:00
Ryan Dahl 2d0b1ed7ad Upgrade libuv to 2640aae
Add test for bug fixed in joyent/libuv@2640aae1
2011-09-15 15:37:57 -07:00
Ryan Dahl b281171030 Support legacy API: process.stdout.fd 2011-09-15 13:57:41 -07:00
Ryan Dahl 5cb1fd2e32 net.Socket(fd) should start readable and writable 2011-09-15 13:35:29 -07:00
Ryan Dahl a1bafc5566 Merge remote branch 'origin/v0.4'
Conflicts:
	deps/http_parser/http_parser.c
	deps/http_parser/test.c
	lib/repl.js
2011-09-15 11:48:37 -07:00
Ryan Dahl 8c87250816 Do not load readline from util.inspect
This causes all modules using console.log() to load readline which seems
unnecessary.
2011-09-12 18:25:23 -07:00
Ryan Dahl 0928f0f290 Fix test-module-load-list
and lazy load modules for process.stdout

This probably breaks test-module-load-list on windows, but it hopefully is
an easy fix to replace "_posix" bindings with "_win32".
2011-09-12 18:12:48 -07:00
Ryan Dahl 0aad61e802 Use net_uv instead of net_legacy for stdio
Also temporary hack to prevent process.stdout from keeping event loop alive
by calling uv_unref on process.stdout initialization.
2011-09-12 17:32:52 -07:00
isaacs 190abcac9d mkdir EEXIST test
Fixed on uv 3c00d87b4239a6b8358e2085f806170c3eca10cf
2011-09-12 17:13:12 -07:00
Thomas Shinnick 7dc2c492e9 fs: unguarded fs.watchFile cache statWatchers checking fixed
Use hasOwnProperty to check filepath cache; previous code could fail if
a filepath duplicated a chained property name.

Fixes #1637.
2011-09-12 15:59:00 +09:00
Thomas Shinnick e58c036c27 fs: add positioned file writing feature to fs.WriteStream
Patterned on same feature in ReadStream; a small bit of new code added
plus two refactorings of previous code; added two test files.

Fixes #1645.
2011-09-12 14:57:49 +09:00
koichik 389e2a07e6 util: Fix inspection for Error
Fixes #1634.
2011-09-11 23:13:06 +09:00
Bert Belder 10e7c52a70 win: make test-cli-eval.js pass 2011-09-11 03:52:44 +02:00
Fedor Indutny 8c2c7bb8a9 vm context with accessors
fixes #1673
2011-09-10 10:51:58 -07:00
Igor Zinkovsky 79ce48d3f0 fix for test-fs-chmod 2011-09-09 21:09:59 +02:00
Igor Zinkovsky 85357abba1 fix test-fs-chmod test 2011-09-09 14:45:37 +02:00
Ryan Dahl 26834b0524 Revert "vm context with accessors"
This reverts commit 4527de8cba.

Causes segfault in test/message/undefined_reference_in_new_context.js
2011-09-08 13:30:52 -07:00
Fedor Indutny 4527de8cba vm context with accessors
true copy of sandbox properties

catch sealed errors, pass global's prototype to CloneObject

Fixes #1673
2011-09-08 11:59:21 -07:00
Ben Noordhuis bb3a1d5b67 http: set .code='ECONNRESET' on socket hang up errors
Fixes #1672.
2011-09-08 20:47:16 +02:00
koichik 6139459d45 util: Fix inspection for sparse array
Fixes #1651.
2011-09-09 00:57:42 +09:00
koichik 526c54c979 buffer: write() should always set _charsWritten.
Fixes #1633.
2011-09-08 11:47:32 +09:00
Ryan Dahl 52044fd1b1 Merge remote branch 'origin/v0.4'
Conflicts:
	lib/net.js
	test/simple/test-buffer.js
2011-09-07 17:51:33 -07:00
Sean Cunningham eb99083d0b tls: add client-side session resumption support 2011-09-07 20:01:14 +02:00
Maciej Małecki fb93ab4125 test: test for correct parsing of URLs with plus character in protocol 2011-09-06 17:04:00 +02:00
Bert Belder 8153a21613 Improve path parsing on windows
Closes #650
2011-09-06 04:47:36 +02:00
Ben Noordhuis 2d9ab49239 file: fix errno propagation in sync fs calls
Include libuv fs error code in the JS exception.

Fixes #1657.
2011-09-06 02:15:08 +02:00
Bert Belder e20d0c1cd0 net-uv: correctly set socket.remoteAddress and -port
closes #1345
2011-09-05 02:10:14 +02:00
koichik 28a908471d crypto: Fix BIO's usage.
Fixes #1612.
Fixes #1296.
2011-09-03 00:53:47 +09:00
Niclas Hoyer b7e36f8584 added test case for foaf+ssl client certificate 2011-09-03 00:49:37 +09:00
Nathan Rajlich cafcc7e67a test: add test case for util.isDate() behavior 2011-09-02 17:29:33 +02:00
koichik 6f60683802 tls: x509 certificate subject parsing fail
Fixes #1568.
2011-08-31 03:47:23 +09:00
Peter Lyons d2defa3012 test: test for issue #752 2011-08-28 23:49:24 +02:00
Ryan Dahl f1996ffebc Merge remote branch 'origin/v0.4'
Conflicts:
	AUTHORS
	ChangeLog
	doc/api/stdio.markdown
	doc/index.html
	doc/template.html
	lib/net.js
	src/node_version.h
	test/simple/test-child-process-customfd-bounded.js
	test/simple/test-console-not-call-toString.js
2011-08-26 13:16:16 -07:00
koichik 43cdbec3be test: simple/test-tls-client-abort fails on SunOS
Fixes #1583.
2011-08-26 23:57:36 +09:00
Ben Noordhuis accc34c50f test: fix simple/test-eval
Test expects output of console.error(process.argv) to be spread out
over several lines but if /path/to/node is short, it stays on a single line.
2011-08-25 00:18:39 +02:00
Ryan Dahl 52a40e0fd5 Add process.features.debug; fixes simple/test-executable-path.js 2011-08-24 14:16:35 -07:00
Ryan Dahl 4e1d6fca8e Mark tests which are broken in libuv 2011-08-23 23:45:21 -07:00
Ryan Dahl a7300c8297 WAF builds in out/ instead of build/ 2011-08-23 14:10:39 -07:00
Ryan Dahl 879eb16280 Have WAF variants match GYP configuration names 2011-08-23 14:10:35 -07:00
koichik 485d5b5dff dns: Force the DNS module to invoke callbacks asynchronously.
Fixes #1164.
2011-08-24 03:01:41 +09:00
Maciej Małecki 94963ab39a Add failing test for https2 compatibility
Issue #1531
2011-08-22 14:30:58 -07:00
Ryan Dahl f5db3f1f85 Fix #1563. overflow in ChildProcess custom_fd. 2011-08-20 12:39:40 -07:00
koichik 4cf931db17 http: improve compatibility of legacy API
In http1, legacy http.Client shares one connection with multiple requests.
But in http2, it uses concurrent connections.
With --use-http1, test/simple/test-http-legacy.js passes.
However, it fails without --use-http1 (use http2).

This improves compatibility of legacy http.Client API between http1 and http2.

Fixes #1530.
2011-08-17 00:19:55 +09:00
koichik 8293bb8a32 test: refactored http test.
Many http tests had used legacy http.Client.
This refactored it to use modern API.

Fixes #1528.
2011-08-16 23:59:57 +09:00
Antranig Basman c05936ca13 vm: fix incorrect dispatch of vm.runInContext for argument "filename"
Adds test case and documentation for vm.runInContext and vm.createContext.

Fixes #1140.
2011-08-16 14:50:04 +02:00
Mikeal Rogers 584ae7b084 Remove http.cat. fixes #1447 2011-08-16 01:24:41 +02:00
Nathan Rajlich 54b409d650 util: isRegExp() should not call toString() on its argument
An overloaded toString() method may have side effects
so don't call it for a simple type check.
2011-08-15 17:22:48 +02:00
Thomas Shinnick 59b815b097 test: add typed arrays to known globals list 2011-08-13 23:51:31 +02:00
Glen Low 04122ad2d3 crypto: PBKDF2 function from OpenSSL 2011-08-12 16:23:11 +02:00
Brian White b7c23ac3f5 Incorporate endianness into buffer.read* function names instead of passing in a boolean flag 2011-08-12 15:49:57 +02:00
Ben Noordhuis 028b33b18a test: add test for #1202, uncatchable exception on bad host name 2011-08-12 15:46:18 +02:00
Ben Noordhuis 3cac57658f test: add test for #1202, uncatchable exception on bad host name 2011-08-12 15:23:29 +02:00
Ryan Dahl 2c11718d79 Add some debug output to test-child-process-double-pipe 2011-08-11 17:25:55 -07:00
isaacs ac4791393e Fix #1497 querystring: Replace 'in' test with 'hasOwnProperty' 2011-08-11 15:36:02 -07:00
isaacs 3210809d0a Fix #1497 querystring: Replace 'in' test with 'hasOwnProperty' 2011-08-11 15:31:29 -07:00
Ben Noordhuis 79f064f565 net: properly export remoteAddress to user land
Fixes failing test:
  test/simple/test-net-remote-address-port.js
2011-08-11 17:51:03 +02:00
Ben Noordhuis f52a8db280 test: fix logic error in test-net-remote-address-port.js
The test intended to register an 'at exit' listener
but called `process.exit()` instead.
2011-08-11 16:26:01 +02:00
Ryan Dahl e6b06bc6c5 win: fix test-process-env
Remove support for setting process.env.TZ as it doesn't seem we can do it
x-platform without fixing V8.
2011-08-10 17:15:13 -07:00
Ryan Dahl 35d0df919a test: Allow common.ddCommand to be run in presence of existing file 2011-08-10 11:32:37 -07:00
Ryan Dahl 4983bd348d x-platform func for spawning pwd in tests
Fixes test-child-process-buffering
2011-08-10 11:23:55 -07:00
Bert Belder c96ef84427 Revert "Make test-sync-fileread pass even when git cr/lf conversion is enabled"
We'll solve this problem with a .gitattributes file.
This reverts commit 27ef0b0903.
2011-08-10 19:59:36 +02:00
Bert Belder 27ef0b0903 Make test-sync-fileread pass even when git cr/lf conversion is enabled 2011-08-10 04:30:31 +02:00
Ryan Dahl 3ce4adf3c6 Remove unnecessary line 2011-08-09 18:05:57 -07:00
Ryan Dahl b3bc009a89 Fix test-net-server-on-fd-0 for windows by removing assert
Rename to regression test for GH-746 as the fd 0 behavior was not what the
bug report was about.
2011-08-09 18:01:54 -07:00
Ryan Dahl 3b0f2cecff Fix dd command tests for Windows 2011-08-09 17:43:57 -07:00
Ryan Dahl 665a4e4a1d Fix test/simple/test-repl 2011-08-09 16:38:48 -07:00
Ryan Dahl 03a119eb70 Improve win compat of test-repl 2011-08-09 16:07:16 -07:00
Ryan Dahl 0696e78d64 Improve assert error messages
1. actual and expected should be displayed in the same order they were given

2. long values should be truncated.
2011-08-09 14:20:06 -07:00
Ryan Dahl acc120a37b windows: fix test-umask 2011-08-09 13:55:04 -07:00
Ryan Dahl ab0b1f9f13 Fix test-executable-path 2011-08-08 17:35:26 -07:00
Ryan Dahl 2126989a32 Fix test-http-upgrade-server and test-http-parser
Problem was introduced in last http-parser upgrade which fixed a long
standing bug with the upgrade event and removed several callbacks.
2011-08-08 17:12:26 -07:00
Robert Mustacchi 0df08c6a0c Endian argument should be a boolean. Signed integers shouldn't run through checks for unsigned integers. Clean up jslint. Provide unchecked uint entry points. 2011-08-08 17:01:57 -07:00
Ryan Dahl df22ccb0de Merge branch 'gyp' 2011-08-08 16:22:41 -07:00
Ryan Dahl 587f6c3117 Fix test-child-process-exec-cwd. 2011-08-08 16:17:18 -07:00
koichik d439c092c2 Improve util.format() compatibility with browser.
Fixes #1434.
2011-08-08 23:24:05 +09:00
isaacs ef35f4d6c1 Test for default host headers on default ports in https and http 2011-08-07 17:37:56 -07:00
Ryan Dahl 43d7cfca18 gyp: fix test runner 2011-08-06 03:12:06 -07:00
Bert Belder 9e8d812ce9 Make test-child-process-exec-env work on windows 2011-08-05 22:57:45 +02:00
Ben Noordhuis 30d20cf405 Revert commits 12c8b27 and 88f416a, fixed properly in 2fe4558. 2011-08-05 04:29:16 +02:00
Ben Noordhuis ac722bbed6 module: strip byte order marker when loading *.js and *.json files
BOMs make V8 raise a 'SyntaxError: Unexpected token ILLEGAL' exception.

Fixes #1440.
2011-08-04 16:52:55 +02:00
Ben Noordhuis f9cfd70946 test: fix bad test in test-cli-eval.js
The test checked that stdout was empty. Forgetting to escape brackets
in the argument to --eval made that true on UNIX systems: the error
was written to stderr.

Props to Peter Bright for reporting the issue.
2011-08-04 16:43:11 +02:00
Ben Noordhuis 12c8b27e24 test: fix exec-after-fork race in test/simple/test-child-process-kill.js 2011-08-03 16:05:49 +02:00