Commit Graph

1316 Commits (1db9a2adbe5e2509d9fea9299835fc120ad6ba2b)

Author SHA1 Message Date
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 
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 .
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 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 .
2011-09-28 11:40:51 -07:00
Fedor Indutny 542156a6a1 debugger: use regexps in repl test
Fixes 
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 
2011-09-27 00:26:16 -07:00
Ryan Dahl 040cf02724 Re-land Bert's test for
Was reverted out in cde81a6675
2011-09-26 12:50:59 -07:00
Fedor Indutny c26cf84a08 debugger: fix backtrace with no frames
Fixes 
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 . 2011-09-22 19:38:01 -07:00
isaacs e06ce7562c Fix 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 . 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 .
2011-09-04 13:53:38 +09:00
koichik 3e853e627e buffer: write() should always set _charsWritten.
Refs .
2011-09-03 11:48:27 +09:00
koichik 96ede8cc9b buffer: Avoid overrun with 'binary' encoding.
Fixes .
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 . 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 .
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 .
2011-09-12 14:57:49 +09:00
koichik 389e2a07e6 util: Fix inspection for Error
Fixes .
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 
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 
2011-09-08 11:59:21 -07:00
Ben Noordhuis bb3a1d5b67 http: set .code='ECONNRESET' on socket hang up errors
Fixes .
2011-09-08 20:47:16 +02:00
koichik 6139459d45 util: Fix inspection for sparse array
Fixes .
2011-09-09 00:57:42 +09:00
koichik 526c54c979 buffer: write() should always set _charsWritten.
Fixes .
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 
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 .
2011-09-06 02:15:08 +02:00
Bert Belder e20d0c1cd0 net-uv: correctly set socket.remoteAddress and -port
closes 
2011-09-05 02:10:14 +02:00
koichik 28a908471d crypto: Fix BIO's usage.
Fixes .
Fixes .
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 .
2011-08-31 03:47:23 +09:00
Peter Lyons d2defa3012 test: test for issue 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 .
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 .
2011-08-24 03:01:41 +09:00
Maciej Małecki 94963ab39a Add failing test for https2 compatibility
Issue 
2011-08-22 14:30:58 -07:00
Ryan Dahl f5db3f1f85 Fix . 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 .
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 .
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 .
2011-08-16 14:50:04 +02:00
Mikeal Rogers 584ae7b084 Remove http.cat. fixes 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 , uncatchable exception on bad host name 2011-08-12 15:46:18 +02:00
Ben Noordhuis 3cac57658f test: add test for , 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 querystring: Replace 'in' test with 'hasOwnProperty' 2011-08-11 15:36:02 -07:00
isaacs 3210809d0a Fix 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 .
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 .
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
Mikeal Rogers 48dcb905f6 Update tests for http2. 2011-08-02 12:12:14 -07:00
Bert Belder 70bf121f21 Partial fix for test-child-process.cwd on windows 2011-08-02 03:27:19 +02:00
Ryan Dahl 2908f323e1 win: fix test-child-process-exec-cwd 2011-08-01 17:40:57 -07:00
Ryan Dahl a44748b3d7 win2k3: fix test-child-process-env 2011-08-01 17:18:01 -07:00
Ryan Dahl 99c15e5661 child_process_uv: don't attempt to pass test-child-process-deprecated-api 2011-08-01 16:05:57 -07:00
Igor Zinkovsky 925b467a4e fix test-child-process-env on windows 2011-08-01 14:49:10 -07:00
Ryan Dahl 1710bea355 Add a few more asserts to test/simple/test-child-process-stdin.js 2011-08-01 14:48:45 -07:00
Ryan Dahl c48b2a98d8 windows: Fix test-module-load-list 2011-08-01 12:09:05 -07:00
Ryan Dahl 19a62589b2 child_process_uv: add exec, fix simple/test-child-process-exec-cwd 2011-07-31 16:24:29 -07:00
Ryan Dahl 7772f21b60 initial pass at lib/child_process_uv.js 2011-07-31 15:58:10 -07:00
koichik d3d8f1b972 Add %% escape to util.format()
Fixes .
2011-07-30 23:56:17 +09:00
Ryan Dahl f01b241057 add wrapper for uv_spawn
process.binding('process_wrap')
2011-07-29 18:03:44 -07:00
Ben Noordhuis 874260b40f util: add sprintf-like format() function
Fixes .
2011-07-30 02:11:31 +02:00
Fedor Indutny 9010f5fbab Add support for TLS SNI
Fixes 
2011-07-29 16:57:28 -07:00
isaacs 703a1ffe52 Revert "AMD compatibility for node"
This reverts commit 9967c369c9.

Conflicts:

	test/simple/test-module-loading.js
2011-07-29 11:56:38 -07:00
koichik 62aaf56d1b Fix http.ClientRequest crashes if end() was called twice
Fixes .
Fixes .
2011-07-30 00:47:17 +09:00
koichik 8b3ba47f88 Fix http.ClientRequest crashes if end() was called twice
Fixes .
Fixes .
2011-07-30 00:07:37 +09:00
Ryan Dahl 799c7bdcb6 Fix test-module-load-list for use-uv 2011-07-27 20:03:02 -07:00
Ryan Dahl 8527f00c3c Lazy load a few modules 2011-07-27 19:54:31 -07:00
Ryan Dahl ea9ee1fb7e Add process.moduleLoadList for better startup transparency 2011-07-27 19:30:32 -07:00
SAWADA Tadashi d3a84bea7b Fix crypto encryption/decryption with Base64.
Fixes .
Fixes .
2011-07-27 00:19:02 +02:00