0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 15:06:33 +01:00
Commit Graph

1331 Commits

Author SHA1 Message Date
Ben Noordhuis
fd29448be0 test: add missing copyright headers 2011-12-06 22:02:26 +01:00
Ben Noordhuis
70bc2e32af test: new test, verify that we don't close and reuse fd 0 2011-12-06 22:02:26 +01:00
isaacs
580e67015c Apply #2257 fix for Pipe streams as well as TTYs 2011-12-06 10:13:31 -08:00
isaacs
cf20b6bf65 Fix #2257 pause/resume semantics for stdin
This makes it so that the stdin TTY-wrap stream gets ref'ed on
.resume() and unref'ed on .pause()

The semantics of the names "pause" and "resume" are a bit weird, but the
important thing is that this corrects an API change from 0.4 -> 0.6
which made it impossible to read from stdin multiple times, without
knowing when it might end up being closed.  If no one has it open, this
lets the process die naturally.

LGTM'd by @ry
2011-12-05 16:47:11 -08:00
Ryan Dahl
6f86b9cb70 Disable test-setproctitle on darwin 2011-12-05 16:25:32 -08:00
Ben Noordhuis
36815e4179 process: fix stack overflow when recursively calling process.exit() 2011-12-05 22:43:27 +01:00
Ben Noordhuis
aeb124f7f3 test: create test file in temp dir 2011-12-05 06:37:18 +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
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
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
Ben Noordhuis
7defbd27ef test: add DSA sign/verify crypto tests 2011-11-22 16:01:07 +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
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
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