246 Commits
Author SHA1 Message Date
Paul Querna 92fb664bfc Expose fingerproint from getPeerCertificate
Expose the SHA1 digest of the certificate as the fingerprint attribute in
the object returned by getPeerCertificate()
2010-09-10 13:31:46 -07:00
Ryan Dahl 7704fb9711 Fix fs.realpathSync('/') 2010-09-10 13:31:39 -07:00
isaacs c099e274d2 Better temporary directory handling for tests.
Add a setUp and tearDown function to the test case class, and use it to
create and remove the test/tmp directory for each test.

TODO: amend other tests.
2010-09-10 13:31:34 -07:00
Felix Geisendörfer 44f8756aab Fix: uncaughtException was broken for main module
See: http://github.com/ry/node/commit/635986e4338cf34cf8e1abc4343ffd69d109bb4e
2010-09-10 13:30:48 -07:00
Ryan Dahl ae2f566fec Call Tick() after coming out of select()
Previously we would only call it before going into select(). This is needed
to fix test/simple/test-next-tick-ordering2.js.
2010-09-10 13:30:38 -07:00
isaacs 2f071ac7d1 Fix issue #262. Allow fs.realpath to traverse above the current working directory. 2010-09-08 17:56:34 -07:00
Tobie Langel bd8ea2bb85 Test for ReadStream typo 2010-09-08 17:56:25 -07:00
Tobie Langel 5bbebf3593 Do not emit WriteStream's drain event before ws.write has been called. 2010-09-08 17:56:12 -07:00
Tobie Langel 0b9dab650e Avoid closing a WriteStream before it has been opened. 2010-09-08 17:55:58 -07:00
Herbert Vojčík 7e9a0173d7 Modifying test-global to accomodate v8 inter-context 'global' protection. 2010-09-08 17:55:38 -07:00
Herbert Vojčík 74b70c3cb1 Removing test-global-between-modules.
Using "global" to push data to require()d modules
not supported under NODE_MODULE_CONTEXTS=1.
2010-09-08 17:55:33 -07:00
Felix Geisendörfer 3d3d00d524 Test case showing a bug in nextTick ordering
nextTick should fire before setTimeout in this test, but it doesn't.
2010-09-08 17:48:02 -07:00
Ryan Dahl dffa9e76a1 test-http-parser should not use private API 2010-09-08 17:47:36 -07:00
Ryan Dahl 90374797f0 Don't refer to private API in test-repl 2010-09-08 17:47:30 -07:00
Benjamin Thomas b30b60717d Fix bug in process._tickCallback where callbacks can get abandoned.
Change process._tickCallback so that if a callback throws an error but
there are other callbacks after it, we indicate that
process._tickCallback needs to be ran again.

Currently, if a callback in process._tickCallback throws an error, and
that error is caught by an uncaughtException handler and
process.nextTick is never called again, then any other callbacks already
added to the nextTickQueue won't be called again.

Updated the next-tick-errors test to catch this scenario.
2010-09-08 17:46:58 -07:00
isaacs b2dfea0361 Treat "//some_path" as pathname rather than hostname by default.
Note that "//" is still a special indicator for the hostname, and this does
not change the parsing of mailto: and other "slashless" url schemes.  It
does however remove some oddness in url.parse(req.url) which is the most
common use-case for the url.parse function.
2010-09-08 17:46:50 -07:00
Ryan Dahl f35a8298b1 Fix style in test/simple/test-dgram-unix.js 2010-09-08 17:46:30 -07:00
Ryan Dahl 294c455678 Remove timer from test/simple/test-dgram-unix.js
Test running already has a timeout mechanism.
2010-09-08 17:46:24 -07:00
Marco Rogers 14f16ec592 fix for fs.readFile to return string when encoding specified on zero length read 2010-09-08 17:45:26 -07:00
Marco Rogers cdee88051d Fixed async fs writes with length 0, it should fire the callback 2010-09-08 17:45:21 -07:00
Ryan Dahl ead58b9a93 Add failing uncaughtException test
FIXME
2010-09-08 17:44:30 -07:00
Johan Euphrosine c306fa241c add readline support for meta-d 2010-09-08 17:44:13 -07:00
Benjamin Thomas 22f67f8585 Fix process.nextTick so thrown errors don't confuse it.
If the function for a process.nextTick throws an error, then the
splice() never removes that function from the nextTickQueue array.  This
makes sure the functions that have been run in _tickCallback get removed
regardless of errors.

Also add a test for this.
2010-09-08 17:43:47 -07:00
Ryan Dahl 416aa73946 Safe constructor: net.Server, net.Stream 2010-09-08 17:43:39 -07:00
Ryan Dahl 6a39a7ed83 Safe Constructor: Buffer 2010-09-08 17:43:32 -07:00
Ryan Dahl ad960f4462 Safe constructors: http.Server and http.Client 2010-09-08 17:43:25 -07:00
Johan Euphrosine 3d8137c582 add test for readline putty support 2010-09-08 17:42:59 -07:00
Johan Euphrosine baa24bd40e add readline support for meta-f and meta-b 2010-09-08 17:42:23 -07:00
Johan Euphrosine 7a836ef813 add home/end support in rxvt and readline tests 2010-09-08 17:42:09 -07:00
Johan Euphrosine 8d2e79451e add tests for console.log arguments handling 2010-09-08 17:40:26 -07:00
Ryan Dahl 60b93cca6d Fix race conditions in test-dgram-multicast.js 2010-08-19 18:49:27 -07:00
Herbert Vojčík 2b126da395 Tests for behaviour of 'global'. 2010-08-18 12:08:39 -07:00
Herbert Vojčík 9253333850 Fix registerExtension for NODE_MODULE_CONTEXTS
Fix of registerExtension-produced non-string module loading with own
context. Plus finishing touches to the test.
2010-08-18 11:46:37 -07:00
Herbert Vojčík cf2b206a8e More changes to tests so they really work under context module loader.
Plus, getting rid of test/common.js defining things in global.
2010-08-17 08:41:05 -07:00
Herbert Vojčík 32e309440f Fix of 'sys.common.debug' calls in tests. 2010-08-17 08:08:36 -07:00
Marco Rogers 6744e59e46 detect 0 length fs writes with tests 2010-08-16 23:57:01 -07:00
Ryan Dahl 4593c04959 Implement net.Server.maxConnections
Simplify EMFILE behavior.
2010-08-15 14:01:55 -07:00
Ryan Dahl a8c2bb41af Fix tests 2010-08-13 08:55:42 -07:00
Ryan Dahl 03123435e0 Remove platform specific asserts 2010-08-13 08:13:54 -07:00
Bert Belder 0e8d858aba One more test with a race condition fixed 2010-08-13 07:18:38 -07:00
Rasmus Andersson 8d5e05668b Added support for multiple listeners to DNS multicast datagrams.
Some platforms require SO_REUSEPORT to be set for the socket.
2010-08-11 19:02:20 -07:00
Bert Belder 7059be19ec Fix http and net tests failing due to race condition
Plus some minor cosmetic corrections
2010-08-11 17:27:44 -07:00
Ryan Dahl 9395786d11 Fix race conditions in tests 2010-08-10 17:48:37 -07:00
Bert Belder aaa1f451e6 Expose cwd option to child_process.exec() 2010-08-06 13:38:41 -07:00
Bert Belder 94914135df New api for child_process.spawn; ability to set cwd for spawn()ed process
Tests for child_process.spawn() use new API

Test for deprecated child_process.spawn() API
2010-08-06 13:37:30 -07:00
cloudhead fe3e419687 querystring.parse: handle undefined value properly 2010-08-05 10:46:28 -07:00
Nick Stenning 0a3eff8021 Standardise module load order for native and registered file extensions.
This patch standardises the load order for modules. Highest priority is trying to load exactly the file the user specified, followed by native extensions, followed by registered extra extensions, etc.

In full, if we require('foo') having registered '.coffee' as an alternative extension, we try and load the following files in order:

    foo
    foo.js
    foo.node
    foo.coffee
    foo/index.js
    foo/index.node
    foo/index.coffee
2010-08-04 16:03:08 -07:00
Nick Stenning 78520ba482 Don't attempt to load a directory.
This patch replaces the path.exists check for module loading with a call to
fs.statSync (or fs.stat for require.async) which ensures that it's not trying
to load a directory.
2010-08-04 15:55:47 -07:00
Ryan Dahl 7db5c8a10d Fix toString('base64') bug
Thanks to Stepan Stolyarov for the test case.
2010-08-04 11:38:48 -07:00
Ryan Dahl adec544fdd Revert "Expose the V8 debug object process.debug"
This reverts commit d9fbb8a580.
2010-08-04 10:38:19 -07:00